Hello all,
First let me start by saying that I am running NAS4Free - I am aware of the forum rules and have already posted on their forums a number of days ago, but have not had a response. I actually think my problem is not OS related, but more that the routing tables I have setup are incorrect.
For background, I want to route all my traffic to/from NAS4Free server to my VPN provider - to do so I have successfully installed OpenVPN. From the configuration files and certificates by the VPN provider, I am able to successfully connect:
The problem is that after VPN is up and running, the server cannot access the internet (for instance ping does not work). I think this has something to do with the routing tables, but it is very confusing to me - here is a result [cmd=]netstat -rn[/cmd] after VPN running:
Here is [cmd=]ifconfig[/cmd]:
Here is [cmd=]netstat -rn[/cmd] without VPN connection (I can access Internet OK):
and [cmd=]ifconfig[/cmd]:
Any help on this would be very much appreciated - I am sure it is something very simple missing.
Many thanks
First let me start by saying that I am running NAS4Free - I am aware of the forum rules and have already posted on their forums a number of days ago, but have not had a response. I actually think my problem is not OS related, but more that the routing tables I have setup are incorrect.
For background, I want to route all my traffic to/from NAS4Free server to my VPN provider - to do so I have successfully installed OpenVPN. From the configuration files and certificates by the VPN provider, I am able to successfully connect:
Code:
Apr 20 10:08:10 nas4free openvpn[4148]: NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Apr 20 10:08:10 nas4free openvpn[4148]: LZO compression initialized
Apr 20 10:08:10 nas4free openvpn[4148]: RESOLVE: NOTE: us-florida.privateinternetaccess.com resolves to 5 addresses
Apr 20 10:08:10 nas4free openvpn[4149]: UDPv4 link local: [undef]
Apr 20 10:08:10 nas4free openvpn[4149]: UDPv4 link remote: 68.233.247.240:1194
Apr 20 10:08:10 nas4free openvpn[4149]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Apr 20 10:08:11 nas4free openvpn[4149]: [server] Peer Connection Initiated with 68.233.247.240:1194
Apr 20 10:08:14 nas4free openvpn[4149]: TUN/TAP device /dev/tun0 opened
Apr 20 10:08:14 nas4free kernel: tun0: link state changed to UP
Apr 20 10:08:14 nas4free openvpn[4149]: /sbin/ifconfig tun0 10.153.1.10 10.153.1.9 mtu 1500 netmask 255.255.255.255 up
Apr 20 10:08:14 nas4free openvpn[4149]: Initialization Sequence Completed
The problem is that after VPN is up and running, the server cannot access the internet (for instance ping does not work). I think this has something to do with the routing tables, but it is very confusing to me - here is a result [cmd=]netstat -rn[/cmd] after VPN running:
Code:
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
0.0.0.0/1 10.153.1.9 UGS 0 0 tun0 =>
default 192.168.0.1 UGS 0 41728 em0
10.153.1.1/32 10.153.1.9 UGS 0 0 tun0
10.153.1.9 link#12 UH 0 0 tun0
10.153.1.10 link#12 UHS 0 0 lo0
68.233.247.240/32 192.168.0.1 UGS 0 13 em0
127.0.0.1 link#10 UH 0 40 lo0
128.0.0.0/1 10.153.1.9 UGS 0 8 tun0
192.168.0.0/24 link#7 U 0 71431 em0
192.168.0.3 link#7 UHS 0 14868 lo0
Here is [cmd=]ifconfig[/cmd]:
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
ether 00:07:e9:0a:2b:b2
inet 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0xa
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
tun2: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
inet6 fe80::207:e9ff:fe0a:2bb2%tun0 prefixlen 64 scopeid 0xc
inet 10.153.1.10 --> 10.153.1.9 netmask 0xffffffff
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Opened by PID 4149
Here is [cmd=]netstat -rn[/cmd] without VPN connection (I can access Internet OK):
Code:
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.0.1 UGS 0 41730 em0
127.0.0.1 link#10 UH 0 40 lo0
192.168.0.0/24 link#7 U 0 72025 em0
192.168.0.3 link#7 UHS 0 14870 lo0
and [cmd=]ifconfig[/cmd]:
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
ether 00:07:e9:0a:2b:b2
inet 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0xa
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
tun2: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
tun0: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Any help on this would be very much appreciated - I am sure it is something very simple missing.
Many thanks