Skip to contentSkip to conversation

1:1 NAT/Not working

DISCUSSION Mike 2 participants 2 messages Jan 28, 2003

lore
Share & tools
lore

Mike

author
#0 lore raw

can anyone give me a hand with this? or do I have to alias the interface? ----- Original Message -----
From: "Mike" <[email protected]>
To: <[email protected]>
Sent: Monday, January 27, 2003 1:38 PM
Subject: Re: 1:1 NAT/Not working

Quoted 1 line

I tried the examples that were shown and I cannot contact the servers. do

I

Quoted 35 lines

need to alias the IPs on a ethernet card? i.e eth0:1?

from outside to inside:

iptables -t nat -A PREROUTING -d 208.15.232.12 -j DNAT --to 192.168.1.167

the other way around:

iptables -t nat -A POSTROUTING -s 192.168.1.167 -j SNAT --to 208.15.131.12

----- Original Message -----
From: "Mike" <[email protected]>
To: <[email protected]>
Sent: Tuesday, January 21, 2003 11:00 AM
Subject: 1:1 NAT

Quoted 4 lines

Can anyone point me to some docs on setting up 1:1 NAT on netfilter?

What I am trying to do is like how its done on cisco PIX i.e "static (inside,outside) 208.15.232.12 192.168.1.167 netmask

255.255.255.255

Quoted 10 lines

0 0"

That way I don't have to do IP alias on my ethernet card.

Thanks,

Mike

#1 lore raw
Quoted 1 line

can anyone give me a hand with this? or do I have to alias the interface?

You have to specify your external intefrace there on both rules:
... -i eth0 ... -j DNAT
... -i eth0 ... -j SNAT

Regards,
Maciej