Hello,
I would like to secure my pi4 (Libreelec 10.0.2 + nas via samba)
For this I first installed vpn-manager, then I imported the .ovpn to connect to my own openvpn server (on the web) via the tun0 network interface.
It works very well
I would now like to configure iptables in order to restrict certain accesses from my local network.
For this I put in the Libreelec interface the "custom" choice (network menu in the config)
Then I typed these basic commands to test some rules:
Code
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -m iprange --src-range 192.168.1.200-192.168.1.254 -j ACCEPT
iptables -A INPUT -p icmp -i eth0 -j ACCEPT
##VPN##
iptables -A INPUT -i tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i tun0 -j ACCEPT
iptables -A FORWARD -i tun0 -j ACCEPT
iptables -A INPUT -j DROP
Display More
Problem: vpn connection is no longer possible when i apply these rules..
I have a little trouble with iptables as soon as it becomes complicated...
Anyone have an idea of my error?