Page 1 of 1

Tun0 with same IP address

Posted: Sun Apr 29, 2012 10:28 pm
by RJDavison
I've been running OpenVPN on a ddwrt router for a couple of years. Unfortunately the router has recently gone bang and I've had to upgrade.

My problem is that we a configuration which is identical to the last router I'm getting a Tun0 interface with the same IP address as follows:

/sbin/ifconfig tun0 5.5.5.2 5.5.5.2 netmask 255.255.255.0 mtu 1500 up

where as I was previously getting:

/sbin/ifconfig tun0 5.5.5.10 5.5.5.9 mtu 1500 netmask 255.255.255.255 up

The result of this seems to be that I can ping internal clients (i.e. my router has a ip of 5.5.5.1), but I can not reach the outside world.

I've got a simple config as follows:

push "dhcp-option DNS 8.8.8.8"
server 5.5.5.0 255.255.255.0
push "redirect-gateway def1"

dev tun0
proto udp
persist-tun
comp-lzo
keepalive 10 120
verb 5

dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem


Any help would be regally appreciated.

Re: Tun0 with same IP address

Posted: Tue May 01, 2012 7:07 am
by janjust
is the DD-WRT box the client or the server? your ifconfig output suggests that we're seeing client output.

The change you see might be related to the topology setting for the VPN - the old output was for 'topology net30' whereas the new output is for 'topology subnet'. See if you can change it back to 'net30' to get the old behaviour back (which is still the OpenVPN default, BTW).

Re: Tun0 with same IP address

Posted: Tue May 01, 2012 10:42 am
by RJDavison
The DD-WRT router is the server. The if-config line is taken from my client when trying to connect to the server.

The new ddwrt router (linksys E4200) is a direct replacement for a previous one (Linksys WRT320N) which seems to have fallen over. Nothing has changed in the network other than an upgrade in the DDWRT firmware from a 1429 build to an 1800 build.

Excuse my ignorance, but how would I change to net30. Is there a command needed in the server / client config?

Re: Tun0 with same IP address

Posted: Tue May 01, 2012 12:31 pm
by janjust
this would depend on the dd-wrt config - most likely your dd-wrt s/w version was also updated.