|
||||||||
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|
I would like to use ***NAME*** instead of IP address in the "--to NAME ort" part of iptable command, butit fails, example :- iptables -t nat -A PREROUTING ..... -j SNAT NAME ortdoes not work. However, iptables -t nat -A PREROUTING ..... -j SNAT IP ortworks. So now, is it expected behaviour and how do I work around it ? Ming-Ching Tiew |
|
#2
|
|||
|
|||
|
> 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¡£ |
|
#3
|
|||
|
|||
|
"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 ortis wrong syntax, iptables -t nat -A PREROUTING ... -j SNAT --to IP ortis correct syntax, iptables -t nat -A PREROUTING -s NAME1 -d NAME2 .... is also correct syntax. |
![]() |
| Tags |
| accept, dnat, iptables, snat |
| Thread Tools | |
| Display Modes | |
|
|