Routing across a multi-homed router from a openvpn tunnel: ping works ssh doesn't.
I attempting to wrap up a multi-homed load-balancing project with the addition of an openvpn server (see configuration diagram). I am unable to receive anything but pings (ssh/http) from any of the servers in LAN1 when tunneling into Router2/LAN2 from ISP 2. As I am hitting a wall here, I am open to suggestions...
Edit/Update: Wireshark sniffing the tx/rx of Interface 2 shows my TCP (web) requests going out and responses comming back to interface 2 (Router2). So the issue resides in the configuration of Router2. Configuration: Code:
RemotePC(vpnEndPoint)
results of Router2# iptables -nvL Code:
Chain INPUT (policy DROP 395 packets, 41092 bytes) Code:
Chain PREROUTING (policy ACCEPT 1032 packets, 76982 bytes) Code:
Kernel IP routing table |
Solution!
After much trial, error, and research... I have managed to get a working solution by not masquerading any connections originating from the tunnel(s) of Router2 with a destination within LAN1 and then placing a static route in the router1 back to the tunnel gateway (Router2) for the tunnel ip subnet.
I am curious why I am able to traverse LAN1 out to the internet using masquerade from the tunnel, however reply packets (only from within LAN1) answering masqueraded requests that originated in the tunnel of Router1 are blocked (I say blocked since I was never able to verify if the packets were dropped or silently dropped...) Could this be bug in iptables or conntrack? i.e. (differences in red) The following will only work in a non-masqueraded state: RemotePC(vpnEndPoint)->Internet->Isp2->(interface 1)Router2(vpnEndPoint)->(interface2)->LAN2->PC1 While packets traversing LAN1 out to the internet (internet pass-through) works just fine masqueraded: RemotePC(vpnEndPoint)->Internet->Isp2->(interface 1)Router2(vpnEndPoint)->(interface2)->LAN2->Router1->Isp1->Internet Solution: excerpt from # iptables -nvL -t nat Code:
Chain POSTROUTING (policy ACCEPT 644 packets, 54030 bytes) Code:
Kernel IP routing table |
All times are GMT -5. The time now is 04:49 AM. |