About nftable nat rule

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux