Koozali.org: home of the SME Server

NAT on SME 5.6 or 6.0

Giedrius

NAT on SME 5.6 or 6.0
« on: October 31, 2003, 11:08:49 AM »
Need hawto about 1 to 1 NAT on SME 5.6 or 6.0

Thanks :)

Luis A. Navas

Re: NAT on SME 5.6 or 6.0
« Reply #1 on: October 31, 2003, 08:15:10 PM »
Go to http://contribs.org and try to find 1to1 NAT this works fine on e-smith 5.x but I not test on SME 6

Have a nice day.

Luis

Charlie Brady

Re: NAT on SME 5.6 or 6.0
« Reply #2 on: November 01, 2003, 02:05:56 AM »
Luis A. Navas wrote:

> Go to http://contribs.org and try to find 1to1 NAT this
> works fine on e-smith 5.x but I not test on SME 6

The contrib can't work on both 5.5 and 5.6 (since it will use either ipchains or iptables), so 5.x isn't accurant and isn't descriptive.

If the contrib works on 5.6, it may work on 6.0, but there has been some reorganisation of the iptables firewalling code, so it needs checking.

Charlie

Giedrius

Re: NAT on SME 5.6 or 6.0
« Reply #3 on: November 01, 2003, 12:48:48 PM »
Hi,
This contrib work only on 5.0 - 5.5

I read iptable NAT hawto and add manual from console:

ifconfig eth1:1 inet NEW_EXT_IP netmask EXT_IP_MASK broadcast EXT_IP_BCAST up

/sbin/iptables -t nat -A PREROUTING --dst NEW_EXT_IP -j DNAT --to-destination INTERNAL_IP_ON_LAN
/sbin/iptables -t nat -D POSTROUTING --dst INTERNAL_IP_ON_LAN -j SNAT --to-source NEW_EXT_IP
/sbin/iptables -t nat -D OUTPUT --dst NEW_EXT_IP -j DNAT --to-destination INTERNAL_IP_ON_LAN

All settings working fine from INTERNAL LAN i can connect to NEW_EXT_IP and all pocets going to INTERNAL_IP_ON_LAN but from Internet i can't access  NEW_EXT_IP !

Any ideas ?

Giedrius

Re: NAT on SME 5.6 or 6.0
« Reply #4 on: November 01, 2003, 12:58:37 PM »
sorry not nat -D only nat -A :)