All of lore.kernel.org
 help / color / mirror / Atom feed
* About nftable nat rule
@ 2017-05-24  8:40 Zheng konia
  2017-05-24  9:07 ` Arturo Borrero Gonzalez
  0 siblings, 1 reply; 6+ messages in thread
From: Zheng konia @ 2017-05-24  8:40 UTC (permalink / raw)
  To: netfilter

Hi,

   I am tranferring Iptables-nat to nftables-nat for testing the nat
forwarding efficiency. However, I have some doubles, hope you can help
me.


  nft add rule nat prerouting tcp dport 80  dnat  192.168.1.100:4040
  nft add rule nat prerouting tcp dport 80  dnat  192.168.1.100:4050
  nft add rule nat prerouting tcp dport 80  dnat  192.168.1.100:4060
  nft add rule nat prerouting tcp dport 80  dnat  192.168.1.100:4070
  ...

  How can I put these rules in one to get load balacne? I have tried
bellow, not work.

 nft add rule nat prerouting tcp dport 80  dnat  192.168.1.100 :
{4040, 4050, 4060, 4070}  persistent

 or using jhash


 nft add rule nat prerouting tcp dport 80  dnat  192.168.1.100 :
jhash ip saddr . tcp dport mod 4 map {0 : 4040, 1 : 4050, 2 : 4060, 3
: 4070}


 Can you show me how to do that? Thanks.



Konia Zheng
2017.05.24

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-24 11:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24  8:40 About nftable nat rule Zheng konia
2017-05-24  9:07 ` Arturo Borrero Gonzalez
2017-05-24  9:30   ` Zheng konia
2017-05-24  9:49     ` Arturo Borrero Gonzalez
2017-05-24 10:44       ` Pablo Neira Ayuso
2017-05-24 11:34         ` Arturo Borrero Gonzalez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.