Re: nftables port forward on DHCP interface to static IP

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

 



On 2021/04/18 11:59, Pekka Järvinen wrote:
Hi,

I'm trying to setup port forward for interface which uses DHCP. I
don't want to reference the interface's public IP in a rule. Is it
possible? My attempt:

iifname $wanif tcp dport {12345} dnat ip to 192.168.1.11

Hi Pekka,

Try:
iifname $wanif tcp dport 12345 dnat 192.168.1.11

or
iifname $wanif tcp dport {12345} dnat 192.168.1.11
	(but the braces are unnecessary unless you want to add more than one dport)

https://wiki.nftables.org/wiki-nftables/index.php/Performing_Network_Address_Translation_(NAT)#Destination_NAT

Best Regards,
Frank



[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