Routing help, cant ping anything

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!
Locked
FrancescoM
OpenVpn Newbie
Posts: 2
Joined: Sat Jul 27, 2013 2:46 pm

Routing help, cant ping anything

Post by FrancescoM » Sat Jul 27, 2013 3:03 pm

Hello guys i'm trying to setup a VPN into my router (Linksys WRT54GL w/ Firmware: DD-WRT v24-sp2 (10/10/09) vpn).
I can connect to the vpn but i can't ping anything. These are my configurations:

Server config

Code: Select all

push "route 192.168.2.0 255.255.255.0"
server 10.8.0.0 255.255.255.0

dev tun0
proto udp
port 1194
persist-key
persist-tun
keepalive 10 120
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
client-to-client
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"

management localhost 5001
Client config

Code: Select all

dev tun
client
proto udp
remote server.no-ip.info 1194
resolv-retry infinite
nobind
persist-key
persist-tun

ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 4
Image

Image

Image

Code: Select all

root@DD-WRT:~# iptables -L -v 
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     0    --  tun0   any     anywhere             anywhere            
    0     0 ACCEPT     udp  --  any    any     anywhere             anywhere            udp dpt:1194 
  111 14001 ACCEPT     0    --  any    any     anywhere             anywhere            state RELATED,ESTABLISHED 
    0     0 DROP       udp  --  ppp0   any     anywhere             anywhere            udp dpt:route 
    0     0 DROP       udp  --  br0    any     anywhere             anywhere            udp dpt:route 
    0     0 ACCEPT     udp  --  any    any     anywhere             anywhere            udp dpt:route 
    0     0 DROP       icmp --  ppp0   any     anywhere             anywhere            
    3   108 DROP       igmp --  any    any     anywhere             anywhere            
    0     0 ACCEPT     0    --  lo     any     anywhere             anywhere            state NEW 
  188 17540 logaccept  0    --  br0    any     anywhere             anywhere            state NEW 
    5   240 DROP       0    --  any    any     anywhere             anywhere            

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     0    --  tun0   br0     anywhere             anywhere            
    0     0 ACCEPT     0    --  br0    tun0    anywhere             anywhere            
    0     0 ACCEPT     0    --  any    any     10.8.0.0/24          anywhere            
    0     0 ACCEPT     gre  --  any    ppp0    192.168.2.0/24       anywhere            
    0     0 ACCEPT     tcp  --  any    ppp0    192.168.2.0/24       anywhere            tcp dpt:1723 
    0     0 ACCEPT     0    --  br0    br0     anywhere             anywhere            
  934 54312 TCPMSS     tcp  --  any    any     anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU 
29172   22M lan2wan    0    --  any    any     anywhere             anywhere            
28134   22M ACCEPT     0    --  any    any     anywhere             anywhere            state RELATED,ESTABLISHED 
    0     0 ACCEPT     tcp  --  any    any     anywhere             DD-WRT              tcp dpt:1723 
    0     0 ACCEPT     udp  --  any    any     anywhere             DD-WRT              udp dpt:1723 
    0     0 ACCEPT     udp  --  any    any     anywhere             DD-WRT              udp dpt:1194 
    0     0 TRIGGER    0    --  ppp0   br0     anywhere             anywhere            TRIGGER type:in match:0 relate:0 
 1038 91556 trigger_out  0    --  br0    any     anywhere             anywhere            
 1038 91556 ACCEPT     0    --  br0    any     anywhere             anywhere            state NEW 
    0     0 DROP       0    --  any    any     anywhere             anywhere            

Code: Select all

root@DD-WRT:~# cat /proc/sys/net/ipv4/ip_forward 
1
root@DD-WRT:~#

Code: Select all

root@DD-WRT:~# ifconfig
br0       Link encap:Ethernet  HWaddr 58:6D:8F:C2:20:74  
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:109559 errors:0 dropped:0 overruns:0 frame:0
          TX packets:138670 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:12865716 (12.2 MiB)  TX bytes:126657843 (120.7 MiB)

br0:0     Link encap:Ethernet  HWaddr 58:6D:8F:C2:20:74  
          inet addr:169.254.255.1  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 58:6D:8F:C2:20:74  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:95863 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68776 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:92007492 (87.7 MiB)  TX bytes:11266076 (10.7 MiB)
          Interrupt:4 

eth1      Link encap:Ethernet  HWaddr 58:6D:8F:C2:20:76  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:105509 errors:0 dropped:0 overruns:0 frame:48237
          TX packets:143075 errors:59 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13692843 (13.0 MiB)  TX bytes:128580254 (122.6 MiB)
          Interrupt:2 Base address:0x5000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:949 errors:0 dropped:0 overruns:0 frame:0
          TX packets:949 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:77603 (75.7 KiB)  TX bytes:77603 (75.7 KiB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:95.238.249.191  P-t-P:192.168.100.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING MULTICAST  MTU:1492  Metric:1
          RX packets:25532 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12945 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:25986107 (24.7 MiB)  TX bytes:1986155 (1.8 MiB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.8.0.1  P-t-P:10.8.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vlan0     Link encap:Ethernet  HWaddr 58:6D:8F:C2:20:74  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4212 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:807269 (788.3 KiB)

vlan1     Link encap:Ethernet  HWaddr 58:6D:8F:C2:20:75  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:95858 errors:0 dropped:0 overruns:0 frame:0
          TX packets:64564 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:90281708 (86.0 MiB)  TX bytes:10151109 (9.6 MiB)

root@DD-WRT:~#
Any idea? thanks!

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Routing help, cant ping anything

Post by maikcat » Sun Jul 28, 2013 9:55 am

what OS/openvpn version your client is using?

Michael
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

FrancescoM
OpenVpn Newbie
Posts: 2
Joined: Sat Jul 27, 2013 2:46 pm

Re: Routing help, cant ping anything

Post by FrancescoM » Sun Jul 28, 2013 11:33 am

maikcat wrote:what OS/openvpn version your client is using?

Michael
Hi Micheal,
seems i solved the problem. I'm posting my working configuration just in case someone needs it!

Code: Select all

Routing Table Entry List

Destination LAN NET	Subnet Mask	Gateway	Interface
192.168.100.1	  255.255.255.255	0.0.0.0	ppp0
10.8.0.2	          255.255.255.255	0.0.0.0	tun0
192.168.2.0	  255.255.255.0	0.0.0.0	LAN & WLAN
10.8.0.0	          255.255.255.0	10.8.0.2	tun0
169.254.0.0	  255.255.0.0	        0.0.0.0	LAN & WLAN
0.0.0.0	          0.0.0.0	                192.168.100.1	ppp0
Server config

Code: Select all

push "route 192.168.2.0 255.255.255.0"
server 10.8.0.0 255.255.255.0

duplicate-cn
dev tun0
proto tcp
port 1194
persist-key
persist-tun
cipher AES-256-CBC
auth SHA512
keepalive 10 120
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
client-to-client
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
management localhost 5001
verb 6
Client config

Code: Select all

dev tun
client
proto tcp
remote xxxxx.no-ip.info 1194
resolv-retry infinite
nobind
persist-key
persist-tun
float
cipher AES-256-CBC
auth SHA512

ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
verb 4
iptables

Code: Select all

iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT
and

Code: Select all

Security - Firewall Protection - Disabled
working on the latest OpenVPN version (win xp/win8) and Tunnelblick for Os X
Thanks!

Locked