bevor ich vollends Wahnsinnig werde, hoffe ich einer von euch kann mir weiter helfen. Ich hab folgendes Setup:
Internet 1 <---> LAN1 (192.168.1.0, Gateway 192.168.1.254) <---> Pi-1 (OpenVPN server, eth0 192.168.1.81, tun0 10.10.80.1) <--> Pi-2 (OpenVPN client, eth0 192.168.0.51, tun 10.10.80.10) <---> LAN2 (192.168.0.0, Gateway 192.168.0.1) <----> Internet 2
Ich will von LAN1 nach Internet 2 routen.
Der Tunnel funktioniert und ich kann von LAN1 bis zu Pi-2 pingen. Alle pings ins internet gehen aber von Pi-1 immer über Internet 1 und nicht über Internet 2.
Routing Tabelle sieht so aus:
Code: Alles auswählen
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
10.10.80.0 10.10.80.2 255.255.255.0 UG 0 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.254 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
Code: Alles auswählen
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
inet 192.168.1.81 netmask 255.255.255.0 broadcast 192.168.1.255
ether b8:27:eb:e4:ce:74 txqueuelen 1000 (Ethernet)
RX packets 162040 bytes 56144464 (53.5 MiB)
RX errors 0 dropped 844 overruns 0 frame 0
TX packets 123708 bytes 19823175 (18.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 2998 bytes 957294 (934.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2998 bytes 957294 (934.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.10.80.1 netmask 255.255.255.255 destination 10.10.80.2
inet6 fe80::6c80:f9c4:39c6:294b prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100
Code: Alles auswählen
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 10.10.80.0/24 anywhere
MASQUERADE all -- 192.168.1.0/24 anywhere