I followed the beginner's OpenVPN guide on this site.
I am able to successfully establish a connection from my client (Android phone, cellular connection) to the OpenVPN server running on my Archer C7. I can ping my C7's IP, but I cannot ping any hosts on the LAN behind the C7.
Any idea how to debug this? Thanks in advance!
root@c7main:~# cat /tmp/openvpn.log
Sat May 6 22:34:39 2017 OpenVPN 2.3.6 mips-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Jan 31 2016
Sat May 6 22:34:39 2017 library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
Sat May 6 22:34:39 2017 Diffie-Hellman initialized with 2048 bit key
Sat May 6 22:34:39 2017 Socket Buffers: R=[163840->131072] S=[163840->131072]
Sat May 6 22:34:39 2017 TUN/TAP device tun0 opened
Sat May 6 22:34:39 2017 TUN/TAP TX queue length set to 100
Sat May 6 22:34:39 2017 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat May 6 22:34:39 2017 /sbin/ifconfig tun0 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Sat May 6 22:34:39 2017 /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Sat May 6 22:34:39 2017 GID set to nogroup
Sat May 6 22:34:39 2017 UID set to nobody
Sat May 6 22:34:39 2017 UDPv4 link local (bound): [undef]
Sat May 6 22:34:39 2017 UDPv4 link remote: [undef]
Sat May 6 22:34:39 2017 MULTI: multi_init called, r=256 v=256
Sat May 6 22:34:39 2017 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Sat May 6 22:34:39 2017 Initialization Sequence Completed
Sat May 6 22:35:58 2017 208.54.4.192:20887 TLS: Initial packet from [AF_INET]208.54.4.192:20887, sid=5b4b28c1 819058ea
Sat May 6 22:35:59 2017 208.54.4.192:20887 VERIFY OK: depth=1, C=US, ST=CA, L=SanDiego, O=RadBradInc, OU=Home, CN=RadBradInc CA, name=EasyRSA, emailAddress=bradpeddigrew@gmail.com
Sat May 6 22:35:59 2017 208.54.4.192:20887 VERIFY OK: depth=0, C=US, ST=CA, L=SanDiego, O=RadBradInc, OU=Home, CN=radbrad, name=EasyRSA, emailAddress=bradpeddigrew@gmail.com
Sat May 6 22:35:59 2017 208.54.4.192:20887 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Sat May 6 22:35:59 2017 208.54.4.192:20887 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat May 6 22:35:59 2017 208.54.4.192:20887 NOTE: --mute triggered...
Sat May 6 22:36:00 2017 208.54.4.192:20887 3 variation(s) on previous 5 message(s) suppressed by --mute
Sat May 6 22:36:00 2017 208.54.4.192:20887 [radbrad] Peer Connection Initiated with [AF_INET]208.54.4.192:20887
Sat May 6 22:36:00 2017 radbrad/208.54.4.192:20887 MULTI_sva: pool returned IPv4=10.8.0.6, IPv6=(Not enabled)
Sat May 6 22:36:00 2017 radbrad/208.54.4.192:20887 MULTI: Learn: 10.8.0.6 -> radbrad/208.54.4.192:20887
Sat May 6 22:36:00 2017 radbrad/208.54.4.192:20887 MULTI: primary virtual IP for radbrad/208.54.4.192:20887: 10.8.0.6
Sat May 6 22:36:01 2017 radbrad/208.54.4.192:20887 PUSH: Received control message: 'PUSH_REQUEST'
Sat May 6 22:36:01 2017 radbrad/208.54.4.192:20887 send_push_reply(): safe_cap=940
Sat May 6 22:36:01 2017 radbrad/208.54.4.192:20887 SENT CONTROL [radbrad]: 'PUSH_REPLY,comp-lzo yes,persist-key,persist-tun,topology subnet,route-gateway dhcp,route 10.10.1.0 255.255.255.0,route 10.8.0.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5' (status=1)
Sat May 6 22:46:46 2017 radbrad/208.54.4.192:20887 TLS: new session incoming connection from [AF_INET]208.54.4.192:20887
Sat May 6 22:46:47 2017 radbrad/208.54.4.192:20887 VERIFY OK: depth=1, C=US, ST=CA, L=SanDiego, O=RadBradInc, OU=Home, CN=RadBradInc CA, name=EasyRSA, emailAddress=bradpeddigrew@gmail.com
Sat May 6 22:46:47 2017 radbrad/208.54.4.192:20887 VERIFY OK: depth=0, C=US, ST=CA, L=SanDiego, O=RadBradInc, OU=Home, CN=radbrad, name=EasyRSA, emailAddress=bradpeddigrew@gmail.com
Sat May 6 22:46:48 2017 radbrad/208.54.4.192:20887 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Sat May 6 22:46:48 2017 radbrad/208.54.4.192:20887 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat May 6 22:46:48 2017 radbrad/208.54.4.192:20887 NOTE: --mute triggered...
Sat May 6 22:46:49 2017 radbrad/208.54.4.192:20887 5 variation(s) on previous 5 message(s) suppressed by --mute
Sat May 6 22:46:49 2017 radbrad/208.54.4.192:20887 PUSH: Received control message: 'PUSH_REQUEST'
Sat May 6 22:46:49 2017 radbrad/208.54.4.192:20887 send_push_reply(): safe_cap=940
Sat May 6 22:46:49 2017 radbrad/208.54.4.192:20887 SENT CONTROL [radbrad]: 'PUSH_REPLY,comp-lzo yes,persist-key,persist-tun,topology subnet,route-gateway dhcp,route 10.10.1.0 255.255.255.0,route 10.8.0.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5' (status=1)
root@c7main:~#
root@c7main:~# cat /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 'fd33:7a1a:afe5::/48'
config interface 'lan'
option ifname 'eth1'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '10.10.1.1'
config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
config interface 'wan6'
option ifname 'eth0'
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 2 3 4 5'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 6'
config interface 'tun0'
option proto 'none'
option ifname 'tun0'
config interface 'vpn0'
option ifname 'tun0'
option proto 'none'
option auto '1'
root@c7main:~#
root@c7main:~# cat /etc/config/firewall
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option network 'lan'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option network 'wan wan6 tun0'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option src_ip 'fe80::/10'
option src_port '547'
option dest_ip 'fe80::/10'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config include
option path '/etc/firewall.user'
config rule
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
config redirect
option target 'DNAT'
option src 'wan'
option dest 'lan'
option proto 'tcp udp'
option src_dport '56969'
option dest_port '56969'
option dest_ip '10.10.1.42'
option name 'qbit'
config rule
option name 'Allow-OpenVPN-Inbound'
option target 'ACCEPT'
option src 'wan'
option proto 'udp'
option dest_port '1194'
config zone
option name 'vpn'
option input 'ACCEPT'
option output 'ACCEPT'
option masq '1'
option network 'vpn0'
option forward 'REJECT'
config redirect
option target 'DNAT'
option src 'wan'
option proto 'udp'
option src_dport '1194'
option dest_port '1194'
option name 'radVPN'
option dest 'vpn'
option dest_ip '10.8.0.1'
option enabled '0'
config rule
option target 'ACCEPT'
option src '*'
option dest_port '1194'
option name 'radVPN1194'
option proto 'udp'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option name 'radVPN80'
option src '*'
option dest_port '80'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option name 'radVPN22'
option src '*'
option dest_port '22'
config rule
option enabled '1'
option target 'ACCEPT'
option proto 'tcp udp'
option name 'radVPN24'
option src '*'
option dest_port '24'
config forwarding
option dest 'lan'
option src 'vpn'
config forwarding
option dest 'wan'
option src 'vpn'
config forwarding
option dest 'vpn'
option src 'lan'
root@c7main:~# cat /etc/config/openvpn
config openvpn 'myvpn'
option enabled '1'
option dev 'tun'
option port '1194'
option proto 'udp'
option comp_lzo 'yes'
option status '/var/log/openvpn_status.log'
option log '/tmp/openvpn.log'
option verb '3'
option mute '5'
option keepalive '10 120'
option persist_key '1'
option persist_tun '1'
option user 'nobody'
option group 'nogroup'
option ca '/etc/easy-rsa/keys/ca.crt'
option cert '/etc/easy-rsa/keys/c7.crt'
option key '/etc/easy-rsa/keys/c7.key'
option dh '/etc/easy-rsa/keys/dh2048.pem'
option mode 'server'
option tls_server '1'
option server '10.8.0.0 255.255.255.0'
option route_gateway 'dhcp'
option client_to_client '1'
list push 'comp-lzo yes'
list push 'persist-key'
list push 'persist-tun'
#list push 'user nobody'
#list push 'user nogroup'
list push 'topology subnet'
list push 'route-gateway dhcp'
list push 'route 10.10.1.0 255.255.255.0'
#list push 'dhcp-option DNS 107.170.95.180'
#list push 'dhcp-option DNS 50.116.40.226'
option tun_ipv6 '0'
root@c7main:~#