I have a Raspberry PI 2, running several servers (FTP, SSH, HTTP… etc).
I started using it as a wireless router (forward tap0
connection to wlan0
); I used this great tutorial. Everything is working great.
When I installed OpenVPN and connected to it, can share my VPN connection to Wi-Fi clients and it’s working well; can access to servers too. But using the VPN’s public IP, can’t connect to my servers but ping is working.
It might be some routing problem, but I can’t figure out what.
The routing table:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 10.4.1.1 128.0.0.0 UG 0 0 0 tap0 default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 default 10.4.1.1 0.0.0.0 UG 512 0 0 tap0 10.4.1.0 * 255.255.255.0 U 0 0 0 tap0 128.0.0.0 10.4.1.1 128.0.0.0 UG 0 0 0 tap0 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 192.168.150.0 * 255.255.255.0 U 0 0 0 wlan0 rxkk.vekoll.uni 192.168.0.1 255.255.255.255 UGH 0 0 0 eth0
Loaded IP table:
# Generated by iptables-save v1.4.14 on Fri Oct 2 00:01:10 2015 *filter :INPUT ACCEPT [447645:303647899] :FORWARD ACCEPT [31:2073] :OUTPUT ACCEPT [388590:80274564] -A FORWARD -i wlan0 -o tap0 -j ACCEPT -A FORWARD -i tap0 -o wlan0 -j ACCEPT COMMIT # Completed on Fri Oct 2 00:01:10 2015 # Generated by iptables-save v1.4.14 on Fri Oct 2 00:01:10 2015 *nat :PREROUTING ACCEPT [11041:767122] :INPUT ACCEPT [2671:258110] :OUTPUT ACCEPT [385:27556] :POSTROUTING ACCEPT [253:17828] -A POSTROUTING -o tap0 -j MASQUERADE COMMIT
I’d be happy if someone can help me.