I now have a working openvpn between an EdgeRouter and a hAP Lite. I can ping the hAP from the edgerouter and I can even ssh into the hAP from the edgerouter. Connectivity seems good!
However, I’m having either a routing problem or a firewall problem. I can’t ping or get to anything on the other subnet, either side. If I tcpdump vtun1, I see the pings going to the other side but nothing comes back.
vtun1 is 10.101.1.1 on the edgerouter side and 10.101.1.2 on the hAP side.
I’m using 192.168.0.0/24 on the lan side of the edgerouter and 192.168.2.0/24 on the lan side of the hAP. The hAP has a route to 192.168.0.0/24 via 10.101.1.1 and visa versa, the edgerouter has a route to 192.168.2.0/24 via 10.101.1.2.
On the edgerouter, I CAN ping 10.101.1.2 but I CANNOT ping 192.168.2.1 or anything on the 192.168.2.x subnet. tcpdump shows icmp going out but nothing coming back.
21:54:04.298435 IP 10.101.1.1 > 192.168.2.1: ICMP echo request, id 16983, seq 1, length 64
21:54:05.297629 IP 10.101.1.1 > 192.168.2.1: ICMP echo request, id 16983, seq 2, length 64
21:54:06.297633 IP 10.101.1.1 > 192.168.2.1: ICMP echo request, id 16983, seq 3, length 64
However, on the hAP side, I CAN ping BOTH 10.101.1.1 and 192.168.0.1. tcpdump shows the icmp echos and replies.
The routing on the hAP side looks like this:
[admin@MikroTik] /ip route> pr
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 192.168.1.1 1
1 ADC 10.101.1.1/32 10.101.1.2 openvpn 0
2 ADS 192.168.0.0/24 10.101.1.1 1
3 ADC 1.2.3.0/24 1.2.3.4 ether1 0
4 ADC 192.168.2.0/24 192.168.2.1 bridge 0
The firewall rules are:
[admin@MikroTik] /ip firewall> export
# may/31/2016 17:47:14 by RouterOS 6.35
# software id = DTS7-0WE6
#
/ip firewall filter
add chain=input comment="defconf: accept ICMP" protocol=icmp
add chain=input comment="defconf: accept establieshed,related" connection-state=\
established,related
add action=drop chain=input comment="defconf: drop all from WAN" in-interface=ether1
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=\
established,related
add chain=forward comment="defconf: accept established,related" connection-state=\
established,related
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" \
connection-nat-state=!dstnat connection-state=new in-interface=ether1
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" out-interface=ether1
Is this a firewall problem? Do I need a rule allowing traffic to go from lan to the vpn? It does not look like a routing problem.