iptables forward to new chain
I've created a iptables scripts wherein it will act as a gateway and redirect all port 80 to squid and block other ports. However, you would notice that 192.168.1.26 is exempted on squid and wasn't include on the port blocking. 192.168.1.26 can surf the net and can do p2p,torrent,etc.
Could anyone advise how could I make 192.168.1.30 access the Internet by bypassing port 80 redirection and can only connect to 110 and 143. Connecting to other ports should be block. I tried to create a new chain and feed 192.168.1.30 there but it seems it was block on all ports. I cannot query pop3 and imap but I could browse the Internet since I'm bypassing port 80 redirection Here is my additional parameters that didn't work: Quote:
Quote:
|
Quote:
Code:
iptables -A FORWARD -p TCP -i $LAN_IN -o $INTERNET \ As a side note, don't you think all this inverted matching just makes stuff more confusing than it should be? BTW, you should look into setting your FORWARD policy to DROP, and only allowing packets in states RELATED and ESTABLISHED from the Internet side, as it doesn't seem like you're running any services there. You could then remove this inverted match in my example and change the target to ACCEPT. |
All times are GMT -5. The time now is 09:39 PM. |