I am trying to Block all udp Port accept only one Port on my rooted Android with iptables command,but I am getting error..
I am using this commands:-
echo 1 65535 > /proc/sys/net/ipv4/ip_local_port_range
iptables -I INPUT -p udp --dport 10312 -j ACCEPT
iptables -I OUTPUT -p udp --dport 10312 -j ACCEPT
iptables -I INPUT -p udp --dport 1:65535 -j DROP
iptables -I OUTPUT -p udp --dport 1:65535 -j DROP
This command working but it’s blocking all udp.10312 Port accept command not working…