Forward all incoming connection to other address
Hello Folks.
I want to Forward all incoming connection to other address. I use Below iptable rule :
iptables -t nat -A PREROUTING -p tcp -m tcp ! --dport 22 -j DNAT --to 1.2.3.4
But not worked? I added same rule with "udp" protocol too but when I scanning my system With Nmap, Nmap scan my address and not 1.2.3.4
Any idea to solve it?
You may also need to alter the mac address as well because unless this box is the default gateway for the destination host the responses would be coming from a different mac address so the clients will think you are trying to spoof the traffic.
Sent from my BlackBerry 10 smartphone.
Original Message
From: Nima Afshari
Sent: Sunday, March 8, 2015 12:27
To: [email protected]
Reply To: [email protected]
Subject: Forward all incoming connection to other address
Hello Folks.
I want to Forward all incoming connection to other address. I use Below iptable rule :
iptables -t nat -A PREROUTING -p tcp -m tcp ! --dport 22 -j DNAT --to 1.2.3.4
But not worked? I added same rule with "udp" protocol too but when I scanning my system With Nmap, Nmap scan my address and not 1.2.3.4
Any idea to solve it?
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html