Skip to contentSkip to conversation

particular DNAT

DISCUSSION luca 1 participant 1 message Sep 6, 2005

lore
Share & tools
lore

luca

author
#0 lore raw

Hi,

I have a firewall netfilter + iptables and the configurations is:

       adsl---------------------      ----------------------dmz ----web
                           eth2|     |eth1                    
                                    FW
                           eth3|     |eth0
       hdsl---------------------      ----------------------- lan

and for the server web i have a DNAT from hdsl on dmz

iptables -t nat -A PREROUTING -p tcp -d ip.public.hdsl --dport 80 -j
DNAT --to $serverweb:80

but now I need a DNAT similar for the adsl

iptables -t nat -A PREROUTING -p tcp -d ip.public.adsl --dport 80 -j
DNAT --to $serverweb:80

for the same server web, but now the response from server web go out from the hdsl line (the defualt gw) and it dont work.

In other word I want to forward the connection to the server web with 2 ip public: ip.public.adsl and ip.public.hdsl but the response pass only from the hdsl line. What can i do to distinguish the 2 different ip public to determine the correct gw ?

For me the ipt_ROUTE is part of the solutions of my problem!

CFH