Linux Netfilter discussions
 help / color / mirror / Atom feed
* nat problems
@ 2002-11-05  6:03 Andrés Suárez
  2002-11-05  7:08 ` Bjørn Ruberg
  0 siblings, 1 reply; 2+ messages in thread
From: Andrés Suárez @ 2002-11-05  6:03 UTC (permalink / raw)
  To: netfilter

Hi:

I'm new to this list, and I have a problem that I don't know if is solved yet, 
but I really need help.

I have a linux machine, with one public IP address, running dns, www, smtp, 
and other services. I have some domains hosted on this machine. Those domains 
have the same IP, because I have only one. That is working fine, I can see 
all of my domains, send mails from and to my machine. Thouse domains are 
visible to and from the internet.

My problem begins here. I want to host one of this domains on other computer, 
inside my local network. This computer have a private IP. 
I create a rule on my iptable, that change the destination address for that 
domain:
iptables -t nat -A PREROUTING -s 0/0 -d mydomain.com -i eth0 -p tcp --dport 80 
-j DNAT --to 10.0.0.2

eth0 is the ethernet card that is connected to the internet. mydomain.com is 
the domain that I want to host on the local machine wich have the local ip 
10.0.0.2

That make that all the traffic on the port 80, goes to the 10.0.0.2 ip, and 
the other domains, on the machine connected to the internet, goes to that ip 
too, and I want ONLY that domain redirect to the private network, to make a 
some kind of dedicated server, using one public ip, and some virtual servers 
on the main maiche (wich is connected to the internet and have the public 
ip).

Thanks,

Andres Suarez
Webmaster
http://www.colservers.com


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

end of thread, other threads:[~2002-11-05  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-05  6:03 nat problems Andrés Suárez
2002-11-05  7:08 ` Bjørn Ruberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox