"lfree" <(E-Mail Removed)> wrote in message news:ck5dif$som$(E-Mail Removed)...
> > I would like to use ***NAME*** instead of IP address
> > in the "--to NAME
ort" part of iptable command, but
> > it fails, example :-
> >
> > iptables -t nat -A PREROUTING ..... -j SNAT NAME
ort
> >
> > does not work. However,
> >
> > iptables -t nat -A PREROUTING ..... -j SNAT IP
ort
> >
> > works. So now, is it expected behaviour and how do I work
> > around it ?
>
> check DNS¡£
I won't post here if it is due to DNS.
You got to try it yourself,
iptables -t nat -A PREROUTING ... -j SNAT --to NAME

ort
is wrong syntax,
iptables -t nat -A PREROUTING ... -j SNAT --to IP

ort
is correct syntax,
iptables -t nat -A PREROUTING -s NAME1 -d NAME2 ....
is also correct syntax.