* nftables DNAT change destport
@ 2015-11-15 10:46 Pankaj Yadav
2015-11-16 10:39 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Pankaj Yadav @ 2015-11-15 10:46 UTC (permalink / raw)
To: netfilter
I am trying to make a DNAT port map using nftables
flush table ip nat
table ip nat {
chain prerouting {
type nat hook prerouting priority 0; policy accept;
dnat tcp dport map { 10737 : 62.210.105.235:8080,
10738 : 62.210.105.257:8081 }
}
chain postrouting {
type nat hook postrouting priority 0; policy accept;
masquerade
}
}
but this ruleset produces error: Error: syntax error, unexpected
colon, expecting comma or '}'
What should be the correct syntax if i want to change destport also
corresponding to IPTABLE's (-j DNAT --to 62.210.105.235:8080 ) ?
I have tried several combinations but none works and Google also didnt
help much.Please help me .
--
Regards
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: nftables DNAT change destport
2015-11-15 10:46 nftables DNAT change destport Pankaj Yadav
@ 2015-11-16 10:39 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2015-11-16 10:39 UTC (permalink / raw)
To: Pankaj Yadav; +Cc: netfilter
On Sun, Nov 15, 2015 at 04:16:06PM +0530, Pankaj Yadav wrote:
> I am trying to make a DNAT port map using nftables
>
> flush table ip nat
> table ip nat {
> chain prerouting {
> type nat hook prerouting priority 0; policy accept;
> dnat tcp dport map { 10737 : 62.210.105.235:8080,
> 10738 : 62.210.105.257:8081 }
> }
>
> chain postrouting {
> type nat hook postrouting priority 0; policy accept;
> masquerade
> }
> }
>
> but this ruleset produces error: Error: syntax error, unexpected
> colon, expecting comma or '}'
>
> What should be the correct syntax if i want to change destport also
> corresponding to IPTABLE's (-j DNAT --to 62.210.105.235:8080 ) ?
> I have tried several combinations but none works and Google also didnt
> help much.Please help me .
Have a look at:
http://wiki.nftables.org/wiki-nftables/index.php/Multiple_NATs_using_nftables_maps
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-16 10:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-15 10:46 nftables DNAT change destport Pankaj Yadav
2015-11-16 10:39 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox