Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Though I'm no expert in iptables, this may do the trick:
iptables -A FORWARD -i eth1 -o eth0 -p tcp --destination-port ! 80 -j DROP
iptables -A FORWARD -i eth1 -o eth0 -p tcp --destination-port ! 443 -j DROP
It will drop any packet going to any port except to 80 and 443( notice ! .. not operator).
Moreover, you may need to put REJECT in place of DROP if you want.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.