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

Re: nat help!



iptables --table nat --append POSTROUTING --source 10.30.142.12 -p tcp
--dport 80 --jump SNAT --to-source 10.30.143.1

This is 'Source Network Address Translation' and I guess this is what
you want. You should be more specific in the future about what you
want to achieve.

On 4/5/06, itachi@cnt.uo.edu.cu <itachi@cnt.uo.edu.cu> wrote:
> hello list
> im trying to nat some address here but nothing happeds
> check this rule
> what is wrong in there=?
>
> iptables -P INPUT ACCEPT
> iptables -P OUTPUT ACCEPT
> iptables -P FORWARD ACCEPT
> iptables -t nat -P PREROUTING ACCEPT
> iptables -t nat -P POSTROUTING ACCEPT
>
> ## Empezamos a filtrar
> ## Nota: eth0 es el interfaz conectado al router y eth1 a la LAN
> # El localhost se deja (por ejemplo conexiones locales a mysql)
> /sbin/iptables -A INPUT -i lo -j ACCEPT
>
> iptables -t nat -A PREROUTING --dst 10.30.142.12 -p tcp --dport 80 -j DNAT
> \--to-destination 10.30.143.1
>
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
>
> thats all on my iptables config
>
> what i have to add to make that rule work
> or i have something wrong in there?

Reply to: