Can't ping anything!

Hoping you can help a newb here...

I bought a HH5 router pre-installed with 18.06/Luci from ebay (yeah, I know) to setup OpenVPN, thinking this would save me time...

I bought the router to plug into my PlusNet (UK) router to be a VPN client. I used a tutorial (http://stitchroads.blogspot.com/2018/08/how-to-setup-nordvpn-openvpn-on.html) which has configured the router with the correct VPN settings, but as I can't even ping ANY address, obviously it doesn't work.

I modified the router IP to 192.168.2.1, my PlusNet internal IP is 192.168.1.254. Added Gateway & DNS as the 1.254 address (according to some tutorial I read)

I'm not sure if it's Interfaces or DHCP/DNS set up incorrectly, or an issue with PlusNet?

etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd64:200c:df97::/48'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option annex 'a'
	option tone 'av'
	option ds_snr_offset '0'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.2.1'
	option gateway '192.168.1.254'
	option dns '192.168.1.254'

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr '40:f2:01:44:24:e4'

config device 'wan_dev'
	option name 'dsl0'
	option macaddr '40:f2:01:44:24:e5'

config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 1 2 4 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '5 6t'

config interface 'openvpn'
	option proto 'none'
	option ifname 'tun0'
	option auto '1'

config interface 'WAN'
	option proto 'dhcp'
	option hostname 'OpenWrtRouter'
	option ifname 'eth0'
	option metric '10'
	option peerdns '0'
	option dns '8.8.8.8'
	option type 'bridge'

etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option nonwildcard '1'
	option localservice '1'
	option noresolv '1'
	list server '192.168.1.254'

config dhcp 'lan'
	option interface 'lan'
	option ra 'server'
	option ignore '1'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

To set up as a LAN device you would turn off the DHCP server. Also you should take out all the stuff related to DSL when you are not using the internal DSL modem.

Conventionally the main router / gateway is at .1. If yours is not you can still work with that but you should use something like .253 for this device to avoid confusion.

I prefer to leave the router's LAN having regular non-VPN access to the Internet, then set up a new network which is the entrance to the VPN tunnel, and another new network to NAT the VPN users (wired or wifi) into the VPN.

I am not sure if you connect the openwrt router to the isp router via a wan or lan port, but this config is wrong:

ipaddr has to be in the same subnet as the gateway, so you could use 192.168.1.253 for ip, the rest looks correct.

If your router is plugged into the modem via the red WAN port, the WAN interface should be configured as a DHCP client. I recommend @bill888's manual which you can find here. There is also a very detailed instruction on how to set up OpenVPN for many providers.

The wan port of my openwrt vpn router is plugged into a lan port on my ISP router.

Thanks for the help.

In that case do not set a gateway in either your lan or wan configuration. DHCP will take care of it.

The LAN IP subnet range must be different from the subnet used by the ISP router.

1 Like