Map Port Range to Another Port Range

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

 



I am trying to directly connect two linux PC's running Ekiga with SIP.
This requires UDP in the port range 5000-5100. Unfortunately this
range is blocked by the modem hardware (VOIP phone) +/- my ISP.

What I would like to do is move traffic on ports 5000-5100 to
6600-6700 (1:1 map).

This would mean:
PC1 output from Ekiga on ports 5000-5100
IPTABLES (PC1) converts to port 6600-6700
Transmitted over network and past VOIP modems
IPTABLES (PC2) converts to ports 5000-5100
PC2 receives into Ekiga.

I know it could be done with 100 individual DNAT rules, but think this
would be prohibitively slow.

So far the best I've been able to come up with was;

iptables -t nat -A OUTPUT -p udp --dport 5000:5100 -j DNAT
--to-destination :6600-6700

but this sends ALL ports (5000-5100) to 6600 (just the one port).

Any suggestions on how I could do 1:1 mapping of ports?
--
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