Hallo,
Ich habe zwei Netze(Home / Office) per WG verknüpft. Zusätzlich gibt es einen VPN von meinem Handy zum Server(Home)
Home: 192.168.180.x
Office: 192.168.179.x
VPN: 10.10.10.x
Falls es noch wichtig ist: Als Router zu Hause habe ich einen TP-Link, im Office eine klassiche "Fritte"
Zuhause im Lan funktioniert alles. (Ping, SAMBA, RDP, SSH, ...)
Nun habe ich folgende Probleme:
1. Auf dem Handy(WLAN - gleicher IP Bereich) funktioniert es , solange ich den VPN nicht aktviere.
2. Bin ich unterwegs möchte ich gerne per VPN nach Hause (das geht) -UND- ins Office kommen(geht nicht)
Meine Konfig:
"Server Home" [Interface] Address = 10.10.10.1/32 ListenPort = XYZ PrivateKey = PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o ens3 -j MASQUERADE # Client1 Smartphone [Peer] PublicKey = AllowedIPs = 10.10.10.2/32 # Site to Site OFFICE [Peer] PublicKey = AllowedIPs = 192.168.179.0/24, 10.10.10.0/24 PersistentKeepalive = 25
"Server Office" [Interface] Address = 10.10.10.6/24 SaveConfig = true PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o ens3 -j MASQUERADE ListenPort = XYZ PrivateKey = [Peer] PublicKey = AllowedIPs = 192.168.180.0/24, 10.10.10.0/24 Endpoint = DOMAIN.MEINE:PORT PersistentKeepalive = 25
"Smartphone" [Interface] Address = 10.10.10.2/32 DNS = 192.168.180.1 ListenPort = PrivateKey = [Peer] AllowedIPs = 0.0.0.0/0 Endpoint = MEINE.DOMAIN:PORT PersistentKeepalive = 25 PublicKey =
Ich hoffe, mich kann jemand erleuchten, wo ich jetzt genau einen Fehler gemacht habe.
Ich wollte es auch gerne vermeiden, im Office auch noch einen Peer fürs Handy anzulegen, weil es nicht das einzige Endgerät bleiben wird.
Im Voraus schon einmal vielen Dank!