Redirect all traffic or range of ports to an IP

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

 



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

$fwtables add element ip nat fwdtoip_udp.eth0 { $srcport : $mydaddr }
$fwtables add element ip nat fwdtoport_udp.eth0 { $srcport : $dstport }

and then

$fwtables 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.

Thanks for any hint
--
Daniel



[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