All of lore.kernel.org
 help / color / mirror / Atom feed
* Newbie Question - Redirect traffic to internal Web server
@ 2002-10-17 19:24 Flávio Brito
  2002-10-17 20:52 ` Antony Stone
  0 siblings, 1 reply; 6+ messages in thread
From: Flávio Brito @ 2002-10-17 19:24 UTC (permalink / raw)
  To: netfilter

Dear List

I have two servers in my net,one with a valid IP. I want to redirect all
the HTTP Traffic(external -> internal) to my internal Web server I'm
trying to learn iptables, but when I test my rules, sometimes when I try
to erase them it appears not do what I want.

Questions
1)
I use it to erase my rules. But sometimes without sucess. Bug? 
#erasing rules 
iptables -F
iptables -F -t nat
iptables -X
iptables -X -t nat
iptables -Z 
iptables -Z  -t nat

2)To redirect the traffic to my internal server I must have a DNS in my
FW server?  or only redirect?


      	[FW]-eth0-> [200.179.213.245]------> Internet
	|
	|
	|eth1 ->[192.168.1.1]
	| ---------------> [Web Server ] 192.168.1.33
	|----------------> [LAN Hosts] [192.168.1.2 to 192.168.1.100]

eth0-> 200.179.213.245
eth1-> 192.168.1.1

Can someone help me with this rules?

iptables -t nat -A POSTROUTING -s 192.168.1.10/24 -d any/0 -j MASQUERADE
iptables -A INPUT -p tcp -s 192.168.1.33 -d 0/0 --dport www -j ACCEPT
iptables -A OUTPUT -p tcp -s 192.168.1.33 -d 0/0 --dport www -j ACCEPT
iptables -A PREROUTING -t nat -p tcp -d 0/0 --dport www -j REDIRECT
--to-port 80

Thanks 

Flávio 





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

end of thread, other threads:[~2002-10-19 23:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-17 19:24 Newbie Question - Redirect traffic to internal Web server Flávio Brito
2002-10-17 20:52 ` Antony Stone
2002-10-17 21:18   ` Aldo S. Lagana
2002-10-17 21:27     ` Antony Stone
2002-10-17 22:34       ` Newbie Question - starting iptables as a service Mario Antonio
     [not found]         ` <001701c277c7$8a675420$4101a8c0@ramasamy>
2002-10-19 23:53           ` Mario Antonio

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.