Hello Everybody,
I am currently using an Odroid C2 running the latest LibreElec. I was looking through the forums and saw that the best way to configure iptables was through autostart.sh , otherwise it will not survive a reboot. I am currently using NFS via the storage-Disk.mount feature. It works great when iptables is not present but I cannot get it to work when using iptables.
I should let you all know that I am a noob when it comes to iptables. I have been using ufw for sometime now. My server is configured with ufw and only allows in from specific ip addresses/ports. Again, this works fine when I do not have iptables running on my Odroid.
I have tried many different iptables configurations but I have not been able to get it to work. When I try to access it through Kodi, it times out and does not show that it is mounted. On my server, I allow in on the following port:111,2049,20048
Here is my most recent configuration that I tried: .25 is the server and .40 is the client. Any help would be sincerely appreciated. I do not want to allow any incoming connections to LibreElec but realize that Iptables has to have some input ability. I was using old computers running manjaro Linux before as my media centers. On those computers, I was using UFW and it was configured as "sudo ufw default deny" and it worked great.
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p tcp --sport 111 -j ACCEPT
iptables -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p tcp --sport 2049 -j ACCEPT
iptables -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p tcp --sport 20048 -j ACCEPT
iptables -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p udp --sport 111 -j ACCEPT
iptables -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p udp --sport 2049 -j ACCEPT
iptables -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p udp --sport 20048 -j ACCEPT
iptables -A OUTPUT -s 172.16.10.40/32 -d 172.16.10.25/32 -o eth0 -p tcp --dport 111 -j ACCEPT
iptables -A OUTPUT -s 172.16.10.40/32 -d 172.16.10.25/32 -o eth0 -p tcp --dport 2049 -j ACCEPT
iptables -A OUTPUT -s 172.16.10.40/32 -d 172.16.10.25/32 -o eth0 -p tcp --dport 20048 -j ACCEPT
iptables -A OUTPUT -s 172.16.10.40/32 -d 172.16.10.25/32 -o eth0 -p udp --dport 111 -j ACCEPT
iptables -A OUTPUT -s 172.16.10.40/32 -d 172.16.10.25/32 -o eth0 -p udp --dport 2049 -j ACCEPT
iptables -A OUTPUT -s 172.16.10.40/32 -d 172.16.10.25/32 -o eth0 -p udp --dport 20048 -j ACCEPT
iptables -I INPUT -i lo -d 127.0.0.1 -j ACCEPT
iptables -I OUTPUT -o lo -s 127.0.0.1 -j ACCEPT
Display More