All of lore.kernel.org
 help / color / mirror / Atom feed
* Understanding the Forward and Postrouting chain
@ 2003-04-15  9:52 Chris Partsenidis
  2003-04-15 10:05 ` Raymond Leach
  2003-04-15 13:23 ` Understanding the Forward and Postrouting chain Joel Newkirk
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Partsenidis @ 2003-04-15  9:52 UTC (permalink / raw)
  To: netfilter

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

Greetings everyone,

While building a complex set a rules for my firewall I have stumbbled
accross a few problems and would like to know if there is anyone to help me
clear a few things in my mind.

If I was to set the Forward chain default policy to DROP, what rules would I
be required to enter in order to allow e.g my internal network hosts to
telnet anywhere on the internet ?

For example take this setup:

LAN -----------------FIREWALL------------------------ Internet
192.168.1.0/24		 public ip: 200.0.0.1
				
In this simple setup, my guess is that Im required to create 3 rules for the
telnet to work.
One for the packets travelling from the Lan to the firewall, one for the
oppisite (internet to the firewall) and then one more
for the postrouting chain to masquerade the packets. Here is what I've done:

1) iptables -P FORWARD DROP
2) iptables -A FORWARD -s 192.168.1.0/24 -p tcp -d 0/0 --dport 23 -j ACCEPT
3) iptables -A FORWARD -p tcp -s 0/0 --sport 23 -d  200.0.0.1 -j ACCEPT
4) iptables -A POSTROUTING -t nat -s 192.168.1.0/24 -p tcp -d 0/0 --dport 23
-j MASQUERADE

Would this be correct, and if not, can you please explain why. I'm not to
sure if loading ip_conntrack would eliminate the need for rule no. 3.

Regards, 

Chris Partsenidis

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 2308 bytes --]

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

end of thread, other threads:[~2003-04-15 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-15  9:52 Understanding the Forward and Postrouting chain Chris Partsenidis
2003-04-15 10:05 ` Raymond Leach
2003-04-15 12:04   ` Bridge + mangling; any similar experiences? Scott MacKay
2003-04-15 13:23 ` Understanding the Forward and Postrouting chain Joel Newkirk

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.