Bekijk de volledige versie : Firewall rules - pls advice
Hi i wanted to ask if its possible to ban some ports on Asus firewall in router.
I want to ban only e.g. kazaa port but all others ports will be open. I am using many ports so i wont define each into firewall table.
TIA
Jolae
## FLUSH actual rules.
iptables -F
iptables -X
iptables -Z
iptables -t nat -F
## Setup default police to acet all
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
##Denied input from eth1(wan packet must into from it).
iptables -A FORWARD -i eth1 -p tcp --sport [KAZAPORT or dennied port] -j DROP
##Activate routing(FORWARD TRAFFIC).
echo 1 > /proc/sys/net/ipv4/ip_forward
i dont probe it but should work. But be careful because a p2p client can be configured in diferent ports-> more complex solution.