0

I have a VPN server running on IP A.A.A.A. I have a mini-router running an openVPN client and masqurading traffic on my local network with an IP of 192.168.99.1. Everything works perfectly, except if I try to access the VPN server at A.A.A.A I can't, I think because of the routers routing table. for instance:

ssh user@A.A.A.A

... fails, because I can't access any ports on the machine. I'm guessing the below routing table is forcing all traffic to A.A.A.A through eth0, but the clients are trying to connect to it through tun0. Any thoughts on how to allow clients through?

On the mini router, the iptables:

Filter table:
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A FORWARD -i tun0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i wlan0 -o tun0 -j ACCEPT
Nat table:
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-A POSTROUTING -o tun0 -j MASQUERADE
Mangle table:
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
Raw table:
-P PREROUTING ACCEPT
-P OUTPUT ACCEPT

And the output of ip route:

0.0.0.0/1 via 192.168.255.13 dev tun0 
default via 10.30.1.1 dev eth0 src 10.30.0.21 metric 202 
10.30.0.0/23 dev eth0 proto kernel scope link src 10.30.0.21 metric 202 
128.0.0.0/1 via 192.168.255.13 dev tun0 
A.A.A.A via 10.30.1.1 dev eth0 
192.168.99.0/24 dev wlan0 proto kernel scope link src 192.168.99.1 
192.168.255.1 via 192.168.255.13 dev tun0 
192.168.255.13 dev tun0 proto kernel scope link src 192.168.255.14 

In this:

  • A.A.A.A is the VPN server
  • 10.X.X.X is the network the mini-router is connected to
  • 192.168.99.X is the internal Wireless network the mini-router has clients on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.