Page 1 of 1

Routing browser traffic through VPN

Posted: Thu Dec 08, 2011 11:54 pm
by bobson
Hi, I'm completely new to this so bear with me.


I've set up OpenVPN following the HOWTO guide and can ping machine on the LAN. The server is running on my desktop which has a connection to a wireless router.

My client connection is a laptop which is connecting to the internet through my phone using a tethering app.

However, after following the section on running all client traffic through the VPN I can no longer connect to any web pages on the client machine (pinging the LAN still works).

Here is my server config:

Code: Select all

port 5656
proto tcp
dev tun
ca keys/ca.crt
cert keys/server.crt
key keys/server.key
dh keys/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.0.1"
client-to-client
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
and my client one...

Code: Select all

client
dev tun
proto tcp
remote my.ip.address 5656
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
comp-lzo
verb3
Is there something obvious I have missed here?

Thanks.

Re: Routing browser traffic through VPN

Posted: Fri Dec 09, 2011 10:06 am
by Mimiko
Does 10.8.0.1 really have a DNS server?
From the client show the results of "tracert 8.8.8.8"

Re: Routing browser traffic through VPN

Posted: Fri Dec 09, 2011 12:00 pm
by bobson
Ok,

I tried changing the IP of the DNS to use a public DNS, still the same issue.

Ran traceroute on 8.8.8.8 and for each hop it just prints out:

1 * * *
2 * * *
....
30 * * *

Thanks

edit: Also had a look at the routing table (on the client) but not really sure what I should be looking at:

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask           Flags    MSS   Window    irtt    Iface
default         10.8.0.5        128.0.0.0         UG       0     0         0       tun0
default         192.168.5.1     0.0.0.0           UG       0     0         0       wlan0
10.8.0.0        10.8.0.5        255.255.255.0     UG       0     0         0       tun0
10.8.0.5        *               255.255.255.255   UH       0     0         0       tun0
vpn.public.ip   192.168.5.1     255.255.255.255   UGH      0     0         0       wlan0
128.0.0.0       10.8.0.5        128.0.0.0         UG       0     0         0       tun0
link-local      *               255.255.0.0       U        0     0         0       wlan0
192.168.5.0     *               255.255.255.0     U        0     0         0       wlan0
** vpn.public.ip is the WAN ip address of the machine running the openVPN server **

Re: Routing browser traffic through VPN

Posted: Fri Dec 09, 2011 1:43 pm
by Mimiko
Make a ping from client to 10.8.0.5. If this does not work - its a firewall issue in the OpenVPN server. If it is working - it's a forwarding issue on OpenVPN server.

Re: Routing browser traffic through VPN

Posted: Fri Dec 09, 2011 2:54 pm
by bobson
Looks like a firewall issue then.

I can ping everything else except from 10.8.0.5.

I'll have a look into the firewall setup (or I may just give up :lol: )