VPN Connection Established but no Internet

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

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

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
jeykon
OpenVpn Newbie
Posts: 2
Joined: Tue Jun 04, 2013 1:57 am

VPN Connection Established but no Internet

Post by jeykon » Tue Jun 04, 2013 2:19 am

I can connect to my server, but can't web browse.

Here is a map of my devices http://imageshack.us/photo/my-images/14/netmapk.jpg/

I dunno whats wrong. Here is my server config

Code: Select all

proto udp
dev tun
ca ca.crt
cert myserver.crt
key myserver.key  
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt

push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 4.2.2.4"
user nobody
group nogroup

persist-key
persist-tun
It's running on a debian 6 server. I want to use the openvpn server for secure work with server configuration and to forward all my PC-traffic to the internet.
I think somethings wrong with the firewall configuration.

Here is my servers ifconfig:

Code: Select all

eth0      Link encap:Ethernet  Hardware Adresse 00:19:99:b2:44:62
          inet Adresse:85.XX.XX.XX  Bcast:85.XX.XX.255  Maske:255.255.255.128
          inet6-Adresse: fe80::XXX:99ff:XXX:4462/64 Gültigkeitsbereich:Verbindung

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX packets:20124 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8697 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes:3032529 (2.8 MiB)  TX bytes:7141531 (6.8 MiB)
          Interrupt:18

lo        Link encap:Lokale Schleife
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:16436  Metrik:1
          RX packets:6817 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6817 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX bytes:2872825 (2.7 MiB)  TX bytes:2872825 (2.7 MiB)

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.8.0.1  P-z-P:10.8.0.2  Maske:255.255.255.255
          UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1500  Metrik:1
          RX packets:1638 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:100
          RX bytes:93754 (91.5 KiB)  TX bytes:1296 (1.2 KiB)
:~# iptables -L -t nat

Code: Select all

Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
SNAT       all  --  10.8.0.0/24          anywhere            to:85.xx.xx.xx
SNAT       all  --  10.8.0.0/24          anywhere            to:85.xx.xx.xx
SNAT       all  --  10.8.0.0/24          anywhere            to:85.xx.xx.xx

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
:~# iptables -L -t nat -v

Code: Select all

Chain PREROUTING (policy ACCEPT 1370 packets, 246K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 212 packets, 13364 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 SNAT       all  --  any    eth0    10.8.0.0/24          anywhere            to:85.xx.xx.xx
    0     0 SNAT       all  --  any    any     10.8.0.0/24          anywhere            to:85.xx.xx.xx
    0     0 SNAT       all  --  any    any     10.8.0.0/24          anywhere            to:85.xx.xx.xx

Chain OUTPUT (policy ACCEPT 212 packets, 13364 bytes)
 pkts bytes target     prot opt in     out     source               destination

rc.local

Code: Select all

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 85.xx.xx.xx
/proc/sys/net/ipv4/ip_forward is set to 1

Can anyone tell me which settings do i need for iptables? I don't know whats wrong or to do

jeykon
OpenVpn Newbie
Posts: 2
Joined: Tue Jun 04, 2013 1:57 am

Re: VPN Connection Established but no Internet

Post by jeykon » Tue Jun 04, 2013 3:21 am

No i'm totally confused. I can load IP-V6 Pages, but not IP-V4?! Whats wrong?!

Post Reply