Routing browser traffic through VPN

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
bobson
OpenVpn Newbie
Posts: 3
Joined: Thu Dec 08, 2011 11:36 pm

Routing browser traffic through VPN

Post by bobson » Thu Dec 08, 2011 11:54 pm

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.

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Routing browser traffic through VPN

Post by Mimiko » Fri Dec 09, 2011 10:06 am

Does 10.8.0.1 really have a DNS server?
From the client show the results of "tracert 8.8.8.8"

bobson
OpenVpn Newbie
Posts: 3
Joined: Thu Dec 08, 2011 11:36 pm

Re: Routing browser traffic through VPN

Post by bobson » Fri Dec 09, 2011 12:00 pm

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 **

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Routing browser traffic through VPN

Post by Mimiko » Fri Dec 09, 2011 1:43 pm

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.

bobson
OpenVpn Newbie
Posts: 3
Joined: Thu Dec 08, 2011 11:36 pm

Re: Routing browser traffic through VPN

Post by bobson » Fri Dec 09, 2011 2:54 pm

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: )

Post Reply