I think a bit more detail is needed. I have opened a new cafe in my area and people are downloading stuff that are increasing my bills, so I want to block protocols on my router and then re enable it for any PC if the PC needs it at a later date which may be days or months
My router runs Openwrt Attitude Adjustment
I was blocking http just to test it and then later add protocols using l7 filter
Hi I am a noob at Iptables and was fiddling with it to get a hold of it.
Here is the system
Router IP-192.168.1.10
PC1 IP-192.168.1.11
PC2 IP-192.168.1.12
Laptop IP-192.168.1.13
Mobile IP-192.168.1.14
I applied the below rule and it dropped all the http packets.
iptables -I FORWARD -m layer7 --l7proto http -j DROP
and then I wanted to enable http for PC1 I wrote the below rule but http does not work.
iptables -I FORWARD -mlayer7 --l7proto http -s 192.168.1.11 -j ACCEPT
It only works when I enter the rule
iptables -I FORWARD -m layer7 --l7proto http -j ACCEPT
but now it enables on all the systems.
What should I do to first block http on all the systems, followed by enabling it on lets say PC1 only.
Thanks for you help!
OUtput
Chain FORWARD (policy DROP 12 packets, 2700 bytes)
pkts bytes target prot opt in out source destination
5 200 ACCEPT all -- * * 192.168.1.113 0.0.0.0/0 LAYER7 l7proto http
25 1036 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 LAYER7 l7proto http