Re: Hostname with DNAT ? {OK}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm afraid i was not very explicit ...

I was trying to use strictly names and that's why :

I have only one public IP and 3 diferrent names. Behind the machine i have a
network with 4 servers which use that names :


Internet ---> eth0(public ip) eth1(private ip) ---> mail.server1.com
                                                                   --->
mail.server2.com
                                                                   --->
mail.server3.com

$IPTABLES -A PREROUTING -t nat -i eth0 -p tcp -d mail.server1.com --dport
25 -j DNAT --to 192.168.14.254:25
$IPTABLES -A FORWARD -i eth0 -p tcp -d mail1.server.com --dport 25 -j ACCEPT

$IPTABLES -A PREROUTING -t nat -i eth0 -p tcp -d mail.server2.com --dport
25 -j DNAT --to 192.168.14.251:25
$IPTABLES -A FORWARD -i eth0 -p tcp -d mail.server2.com --dport 25 -j ACCEPT

$IPTABLES -A PREROUTING -t nat -i eth0 -p tcp -d mail.server3.com --dport
25 -j DNAT --to 192.168.14.253:25
$IPTABLES -A FORWARD -i eth0 -p tcp -d mail.server3.com --dport 25 -j ACCEPT

I realized that iptables uses the resolved IP address but that's exactly
what i was trying to avoid.

Can that be possible ?

Thanks very much in advance,

Danila Octavian



-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.
Service.Agress.Ro E-Mail Scanning Service



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux