Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allowing a b block within a blocked A block in IP tables 1

Status
Not open for further replies.

farley99

MIS
Feb 12, 2003
413
US
My firewall starts with.........
:INPUT ACCEPT [4400319:1130017899]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [5568995:5314777223]
:acctboth - [0:0]
-A INPUT -s 216.0.0.0/255.0.0.0 -j DROP
-A INPUT -s 61.0.0.0/255.0.0.0 -j DROP
-A INPUT -s 218.0.0.0/255.0.0.0 -j DROP
-A INPUT -s 217.0.0.0/255.0.0.0 -j DROP
-A INPUT -j acctboth
-A OUTPUT -j acctboth


I need to allow....
61.217.216.59
and
217.212.0.0/13

How do I do that?
 
I'm quite a newbie at iptables myself, but I would think that:
[tt]:INPUT ACCEPT [4400319:1130017899]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [5568995:5314777223]
:acctboth - [0:0]
-A INPUT -s 217.212.0.0/13 -j ACCEPT
-A INPUT -s 61.217.216.59 -j ACCEPT
-A INPUT -s 216.0.0.0/255.0.0.0 -j DROP
-A INPUT -s 61.0.0.0/255.0.0.0 -j DROP
-A INPUT -s 218.0.0.0/255.0.0.0 -j DROP
-A INPUT -s 217.0.0.0/255.0.0.0 -j DROP
-A INPUT -j acctboth
-A OUTPUT -j acctboth[/tt]
should work.

//Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top