what routes to set with openvpn
robert
robert at redcor.ch
Thu May 7 15:07:05 UTC 2015
Hi there,
I have openvpn running on an ubuntu box
and some raspberries I want to be able to access troug openvpn.
Now this works fin as long as thy are not accessible in the local net an
only using an openvpn connection that runs over ppp.
when I have them in my local net and want to work on them, I can access
them fine, as long as the openvpn is not started on them.
If it is started they become quasi inaccessible.
I get ping responds but most of them are lost.
What routes should I set to avoid this situation?
thanks for your valuable help
robert
this is my setting on the pc:
eth0 Link encap:Ethernet HWaddr 38:60:77:26:7e:72
inet addr:10.42.0.140 Bcast:10.42.0.255 Mask:255.255.255.0
inet6 addr: fe80::3a60:77ff:fe26:7e72/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
robert at mozart:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.42.0.1 0.0.0.0 UG 0 0 0 eth0
10.42.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
This is the setting on the server:
------------------------------------------
[root at hermes ~]# ifconfig
green0 Link encap:Ethernet HWaddr 00:19:66:40:1D:91
inet addr:10.42.0.1 Bcast:10.42.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
orange0 Link encap:Ethernet HWaddr 00:50:04:44:B1:DA
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
red0 Link encap:Ethernet HWaddr 00:30:4F:16:50:E0
inet addr:46.140.116.238 Bcast:46.140.116.239
Mask:255.255.255.252
UP BROADCAST RUNNING MTU:1500 Metric:1
tun0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.146.176.1 P-t-P:10.146.176.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
[root at hermes ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 46.140.116.237 0.0.0.0 UG 0 0 0 red0
10.42.0.0 0.0.0.0 255.255.255.0 U 0 0 0 green0
10.146.176.0 10.146.176.2 255.255.255.0 UG 0 0 0 tun0
10.146.176.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
46.140.116.236 0.0.0.0 255.255.255.252 U 0 0 0 red0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 orange0
This is the setting on the raspberry:
-----------------------------------------------
root at spsconnect5:~# ifconfig
eth0 Link encap:Ethernet Hardware Adresse b8:27:eb:c1:e2:ef
inet Adresse:10.42.0.30 Bcast:10.42.0.255 Maske:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
ppp0 Link encap:Punkt-zu-Punkt-Verbindung
inet Adresse:10.77.89.242 P-z-P:10.64.64.64
Maske:255.255.255.255
UP PUNKTZUPUNKT RUNNING NOARP MULTICAST MTU:1500 Metrik:1
RX packets:400 errors:0 dropped:0 overruns:0 frame:0
TX packets:398 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:3
RX bytes:50871 (49.6 KiB) TX bytes:42015 (41.0 KiB)
tun0 Link encap:UNSPEC Hardware Adresse
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet Adresse:10.146.176.105 P-z-P:10.146.176.205
Maske:255.255.255.255
UP PUNKTZUPUNKT RUNNING NOARP MULTICAST MTU:1400 Metrik:1
RX packets:82 errors:0 dropped:0 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:100
RX bytes:12466 (12.1 KiB) TX bytes:8017 (7.8 KiB)
root at spsconnect5:~# route -n
Kernel-IP-Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
10.42.0.0 10.146.176.205 255.255.255.0 UG 0 0 0 tun0
10.42.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
10.146.176.0 10.146.176.205 255.255.255.0 UG 0 0 0 tun0
10.146.176.205 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
More information about the ubuntu-users
mailing list