Jump to content
Sign in to follow this  
zoll38

iptables help

Recommended Posts

Hello,

I followed the raspberry-pi-vpn-access-point tuto to share the internet connection going thru the wifi connection to a device connected to the ethernet. Wifi trafic goes thru openvpn. All is working fine including access thru local network 192.168.x.x, including ftp and ssh.

But I can't access ftp or ssh from the internet. The ports are open on the router. If I stop the vpn, I can reach the ftp server from internet.

I guess that I need to update my iptables to allow the ftp trafic to go outside of the vpn but I am not an expert on this.  Here is my iptables:

 

*filter
:INPUT ACCEPT [159:10608]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [161:35429]
-A FORWARD -i tun0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o tun0 -j ACCEPT
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7
COMMIT
# Completed on Fri Oct 19 15:18:43 2018
# Generated by iptables-save v1.6.0 on Fri Oct 19 15:18:43 2018
*nat
:PREROUTING ACCEPT [38:2965]
:INPUT ACCEPT [2:157]
:OUTPUT ACCEPT [2:1069]
:POSTROUTING ACCEPT [2:1069]
-A POSTROUTING -o tun0 -j MASQUERADE
COMMIT
 

Can anyone help me?

Thanks a lot.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×