Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Simple iptables firewall ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
TenPin
Guru
Guru


Joined: 26 Aug 2002
Posts: 500
Location: Kansas City

PostPosted: Fri Oct 18, 2002 2:01 pm    Post subject: Simple iptables firewall ? Reply with quote

I use these rules for iptables. I was wondering if anyone can improve on this without getting hideously complex. This machine has 2 interfaces, 1 for the cable modem and the other for LAN.

-t nat -A POSTROUTING -o eth0 -j MASQUERADE
-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
-A INPUT -i eth0 -p tcp --dport 113 -j REJECT --reject-with tcp-reset
-A INPUT -i eth0 -j DROP

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum