All of lore.kernel.org
 help / color / mirror / Atom feed
* FORWARD rules
@ 2003-09-10 17:52 Payal Rathod
  2003-09-10 18:44 ` Ramin Dousti
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Payal Rathod @ 2003-09-10 17:52 UTC (permalink / raw)
  To: netfilter

Hi,
I had kept the default policy of FORWARD as drop.
Now, I wanted to see an internal machine from internet. So, I used
DNAT as,

iptables -A PREROUTING -t nat -d <ext ip> -j DNAT --to <int ip>
It didn't work. When I set the default FORWARD policy to ACCEPT it
worked.

What is a better approach? I want to have a default DROP in FORWARD
chain. My FORWARD chain looked like this,


$IPTABLES -A FORWARD -s 125.125.125.0/32 -p tcp -m tcp --dport 53 -j ACCEPT
$IPTABLES -A FORWARD -s 125.125.125.0/32 -p udp -m tcp --dport 53 -j ACCEPT
$IPTABLES -A FORWARD -s 125.125.125.0/32 -p tcp -m tcp --dport 80 -j ACCEPT
$IPTABLES -A FORWARD -s 125.125.125.0/32 -p tcp -m tcp --dport 110 -j ACCEPT
$IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

What more do I add to allow natting as well as a secure FORWARD policy?
Is the position of ESTABLISHED rule ok?

Thanks a lot for the help in advance and waiting eagerly for the mails.
With warm regards,
-Payal





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


^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: FORWARD rules
@ 2003-09-16  4:28 Payal Rathod
  0 siblings, 0 replies; 21+ messages in thread
From: Payal Rathod @ 2003-09-16  4:28 UTC (permalink / raw)
  To: Cedric Blancher; +Cc: Arnt Karlsen, netfilter

On Mon, Sep 15, 2003 at 07:34:22PM +0200, Cedric Blancher wrote:
> Le lun 15/09/2003 à 18:32, Arnt Karlsen a écrit :
> > ..me too, ;-)  I ofcourse meant we "weren't too clear on what 
> > we meant to say"...  ;-)
> 
> We are now, that's the important point :)

I am still confused. What you really meant and what you really said. Are
you losing your  brains or am I :)
-Payal

> -- 
> http://www.netexit.com/~sid/
> PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
> 

-- 
For GNU/Linux Success Stories and Articles visit:
          http://payal.staticky.com


\x01\x02Boundary_(ID_4A0cY3G8hOPMC+Afj5AwCA)



^ permalink raw reply	[flat|nested] 21+ messages in thread
* Forward rules
@ 2003-11-28 19:18 Alejandro Cabrera Obed
  2003-11-28 20:03 ` Jeffrey Laramie
  0 siblings, 1 reply; 21+ messages in thread
From: Alejandro Cabrera Obed @ 2003-11-28 19:18 UTC (permalink / raw)
  To: Netfilter lista (iptables)

Hello !!!

I'm building my FORWARD table rules, and I want to implement this: "Drop all
FORWARD packets by default and then accept only packets coming from LAN
(192.168.0.0/24) with the related and established condition and leaving my
external interface ($INET_IFACE)".

Is the next ruleset according to what I want or can I change the order ???

$IPTABLES -P FORWARD DROP
$IPTABLES -A FORWARD -s 192.168.0.0/24 -o $INET_IFACE -j ACCEPT
$IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

I suppose with this implementation I'm discarding packet forwarding coming
from 127.0.0.0/24, 10.0.0.0/8 and 172.16.0.0/12 (because my default policy
is DROP by default)....is it OK ???

Thousands of thanks :)

Alejandro



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

end of thread, other threads:[~2003-11-28 20:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-10 17:52 FORWARD rules Payal Rathod
2003-09-10 18:44 ` Ramin Dousti
2003-09-11  2:15   ` netfilter
2003-09-10 18:47 ` Vladimir Potapov
2003-09-11  6:09 ` Vishwanatn T. K.
2003-09-12 10:09   ` Payal Rathod
2003-09-12 10:45     ` Cedric Blancher
2003-09-12 14:36       ` Arnt Karlsen
2003-09-12 14:51         ` Cedric Blancher
2003-09-12 18:14           ` Arnt Karlsen
2003-09-13  2:26             ` Payal Rathod
2003-09-13  6:42               ` Arnt Karlsen
2003-09-15  7:56                 ` Cedric Blancher
2003-09-15 16:32                   ` Arnt Karlsen
2003-09-15 17:34                     ` Cedric Blancher
2003-09-16  4:28                       ` Payal Rathod
2003-09-16 23:31                         ` Arnt Karlsen
2003-09-12 10:35   ` Cedric Blancher
  -- strict thread matches above, loose matches on Subject: below --
2003-09-16  4:28 Payal Rathod
2003-11-28 19:18 Forward rules Alejandro Cabrera Obed
2003-11-28 20:03 ` Jeffrey Laramie

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.