patrickvanharen Hi guys, I like to install openvpn in a docker container. Unfortunately I can't access internet when I connect my client. Openvpn server routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 172.17.0.1 0.0.0.0 UG 0 0 0 eth0 10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0 10.8.0.2 * 255.255.255.255 UH 0 0 0 tun0 172.17.0.0 * 255.255.0.0 U 0 0 0 eth0 ifconfig eth0 Link encap:Ethernet HWaddr 02:42:ac:11:00:09 inet addr:172.17.0.9 Bcast:0.0.0.0 Mask:255.255.0.0 inet6 addr: fe80::42:acff:fe11:9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1918 errors:0 dropped:0 overruns:0 frame:0 TX packets:1357 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:514508 (514.5 KB) TX bytes:141014 (141.0 KB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:46 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:2873 (2.8 KB) TX bytes:0 (0.0 B) Port forwarding is enabled on the docker container. Openvpn client routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 10.8.0.5 128.0.0.0 UG 0 0 0 tun0 default kant 0.0.0.0 UG 0 0 0 eth0 docker01 kant 255.255.255.255 UGH 0 0 0 eth0 10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0 tun0 10.8.0.5 * 255.255.255.255 UH 0 0 0 tun0 128.0.0.0 10.8.0.5 128.0.0.0 UG 0 0 0 tun0 192.168.0.0 * 255.255.255.0 U 1 0 0 eth0 192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0 ifconfig: eth0 Link encap:Ethernet HWaddr 2c:44:fd:2a:77:5e inet addr:192.168.0.28 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::2e44:fdff:fe2a:775e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:583879 errors:0 dropped:0 overruns:0 frame:0 TX packets:382348 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:504043148 (504.0 MB) TX bytes:59966321 (59.9 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:58101 errors:0 dropped:0 overruns:0 frame:0 TX packets:58101 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5430003 (5.4 MB) TX bytes:5430003 (5.4 MB) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.8.0.6 P-t-P:10.8.0.5 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) virbr0 Link encap:Ethernet HWaddr 6a:83:d9:9c:f2:a1 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) I don't understand why 10.8.0.5 is the gateway from the client. I didn't define that IP in config files or anywhere. However, I can't ping that IP. I think 10.8.0.1 has to be the gateway IP, I can connect that successfully. Do you guys have some suggestions? Thanks in advance 🙂 Patrick
Traffic patrickvanharen wroteI don't understand why 10.8.0.5 is the gateway See --topology in The Manual v23x
patrickvanharen Thank you. I tried all options. The gateway IP is now 10.0.8.1 (that's correct and I can ping it), but unfortunately I still can't ping to the world. Any sugestions?