We help IT Professionals succeed at work.

Linux IPTables Mangling Rule

nlhess2003
nlhess2003 asked
on
Medium Priority
430 Views
Last Modified: 2012-05-11
I'm looking for a way to create an iptables mangling rule that will allow traffic from a local ip and port to be redirected to an external ip address. I realize this is normally not a good idea, but a proprietary piece of software we are using requires connections to be made from non-internal IP addresses on the LAN.
Comment
Watch Question

Commented:
like this?
iptables -t mangle -A FORWARD -i eth1 -o eth0 -p tcp -m multiport --dports 1024:5189,5191:8079,8081:65535 -j MARK --set-mark 100

Commented:
or this:
iptables -t mangle -A FORWARD -i eth1 -o eth0 -s 192.168.0.10 -d 80.91.177.150 -p tcp -m multiport --dports 1024:5189,5191:8079,8081:65535 -j MARK --set-mark 100
IT Engeneer
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.