Re: Redirect all traffic or range of ports to an IP

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

 



On Sat, Jul 03, 2021 at 04:13:50PM +0200, Daniel wrote:
> Hi list,
> 
> I face an error while trying to redirect all traffic to an IP. Letś say I
> want to redirect all incomint udp to 10.10.10.10 internal address.
> 
> My rules are working prefectly when redirecting unique ports. I use those
> rules
> 
> nft add element ip nat fwdtoip_udp.eth0 { $srcport : $mydaddr }
> nft add element ip nat fwdtoport_udp.eth0 { $srcport : $dstport }
> 
> and then
> 
> nft add rule ip nat prerouting dnat udp dport map @fwdtoip_udp.eth0 : udp dport map @fwdtoport_udp.eth0
> 
> If $srcport=$dstport=1-65534 I get "Error: value must be a singleton" for
> the $dstport when adding element.
> 
> Is there a way to  use this configuration to redirect all traffic to an IP
> or should I create other rules ? BTW, problem is also existing if I want ro
> redirect ports like 20000-30000 for eg RTP.

Please, see:

https://patchwork.ozlabs.org/project/netfilter-devel/patch/20210712170424.11071-1-pablo@xxxxxxxxxxxxx/

Thanks.



[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