Results 1 to 5 of 5
Hi,
I am running my application that include many servers.
I want to modify the destination port of receiving packets according to the destination ip.
I try to use iptables ...
- 11-03-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 7
port redirecting
Hi,
I am running my application that include many servers.
I want to modify the destination port of receiving packets according to the destination ip.
I try to use iptables but the problem is that when I redirect the port it also modify the destination address.
Is there other way to do this ?
If not can I recompile the iptables/netfilter code to not change the destination address ? Where in the code I should do that ?
Thanks
- 11-03-2010 #2Just Joined!
- Join Date
- Nov 2010
- Posts
- 4
- 11-03-2010 #3Just Joined!
- Join Date
- Sep 2006
- Location
- Norfolk Island
- Posts
- 31
iptables can do it.
If you post your iptables rule it would help, I presume you are trying something like this
cheersCode:iptables -t nat -A PREROUTING -i eth0 -p tcp -s 1.2.3.4 -d 5.6.7.8 --dport 80 -j DNAT --to 5.6.7.8:8080
- 11-04-2010 #4Just Joined!
- Join Date
- Oct 2010
- Posts
- 7
port redirecting
Hi,
I have 20000 servers on my machine so if I want to use nat I need to write 20000 line in iptable. Is this possible ?
I prefer to use the redirect option but the problem is that the destination address is modifing. Is there a way without modify the dest address using iptables or something else ?
Thanks
- 11-04-2010 #5Just Joined!
- Join Date
- Sep 2006
- Location
- Norfolk Island
- Posts
- 31
No. IPTables is not your solution, better code is.


Reply With Quote
