All of lore.kernel.org
 help / color / mirror / Atom feed
* default policy
@ 2003-08-26  8:35 Payal Rathod
  2003-08-25  8:59 ` Ralf Spenneberg
  0 siblings, 1 reply; 8+ messages in thread
From: Payal Rathod @ 2003-08-26  8:35 UTC (permalink / raw)
  To: netfilter

Hi,
I am trying a routing firewall which will route internal machines to
internet as well as redirect machines from outside to 1 ftp server
inside.

But I am not able to get even the first part working.
I use policy as default on FORWARD and,


$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P FORWARD DROP

$IPTABLES -t nat -A POSTROUTING -j MASQUERADE

$IPTABLES -A INPUT -p tcp -s 0/0  --dport 21 -j ACCEPT
$IPTABLES -A INPUT -p tcp -s 0/0  --dport 25 -j ACCEPT
$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 0 -j ACCEPT

$IPTABLES -A FORWARD -s 125.125.125.0/24 -p tcp -m tcp --dport 21 -j ACCEPT
$IPTABLES -A FORWARD -s 125.125.125.0/24 -p tcp -m tcp --dport 80 -j ACCEPT
$IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -p icmp --icmp-type 0 -j ACCEPT

When I make FORWARD POLICY as ACCEPT it works, but not when I make it
to DROP? Is there any bad rule anywhere?
Is the MASQUERADE rule ok? (Traffic is coming form 2 interfaces).
Is the ESTABLISHED,RELATED rule ok and at right position?

Please help me in this.
Thanks a lot and bye.
With warm regards,
-Payal

-- 
"Visit GNU/Linux Success Stories"
http://payal.staticky.com
Guest-Book Section Updated.


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Default policy
@ 2002-12-21 13:16 system
  2002-12-21 13:28 ` Rob Sterenborg
  2002-12-21 18:12 ` Giorgio Zarrelli
  0 siblings, 2 replies; 8+ messages in thread
From: system @ 2002-12-21 13:16 UTC (permalink / raw)
  To: iptables

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

Hi All,

Following is the policy that my firewall generation script gives, but my system hangs when i execute this, I am using ssh to execute this script. I am opening all other required ports. When I comment the last two lines my script works fine.

******Script*******

#Set default policies to DROP 

$IPTABLES -F INPUT 
$IPTABLES -F OUTPUT 
$IPTABLES -F FORWARD 
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP 
$IPTABLES -P FORWARD DROP

# Rejecting all Packets

#$IPTABLES -A INPUT -s 0/0 -d 0/0 -p udp -j DROP
#$IPTABLES -A INPUT -s 0/0 -d 0/0 -p tcp -j DROP

Can anyone help me.

thanks in advance.

Regards,


[-- Attachment #2: Type: text/html, Size: 1541 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread
* default policy
@ 2002-11-01  3:58 Rob
  2002-11-01 23:22 ` Robert P. J. Day
  0 siblings, 1 reply; 8+ messages in thread
From: Rob @ 2002-11-01  3:58 UTC (permalink / raw)
  To: Netfilter

I have been looking at several scripts checking the default policies on
them.
Some include items that others don't.  Oscars tutorial doesn't cover all of
these compared to Ziegler's book.  I have been wondering if the following
covers ALL built-in chains?
iptables -P INPUT   DROP
iptables -P OUTPUT  DROP
iptables -P FORWARD DROP

Ziegler's book states that it should be this (it was never put in these
words but this is what I am gathering from my reading):
iptables -t nat    -P PREROUTING  DROP
iptables -t nat    -P OUTPUT      DROP
iptables -t nat    -P POSTROUTING DROP
iptables -t mangle -P PREROUTING  DROP
iptables -t mangle -P OUTPUT      DROP
iptables -t filter -P INPUT       DROP
iptables -t filter -P OUTPUT      DROP
iptables -t filter -P FORWARD     DROP

The last seems to be the most thorough but i cant find anywhere that covers
this in detail.
Are these all of the built-in chains?


Robert Wideman



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-08-26  8:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-26  8:35 default policy Payal Rathod
2003-08-25  8:59 ` Ralf Spenneberg
2003-08-25 14:56   ` Payal Rathod
  -- strict thread matches above, loose matches on Subject: below --
2002-12-21 13:16 Default policy system
2002-12-21 13:28 ` Rob Sterenborg
2002-12-21 18:12 ` Giorgio Zarrelli
2002-11-01  3:58 default policy Rob
2002-11-01 23:22 ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.