Link to home
Start Free TrialLog in
Avatar of nlhess2003
nlhess2003

asked on

Linux IPTables Mangling Rule

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.
Avatar of pilson66
pilson66
Flag of Ukraine image

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
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
ASKER CERTIFIED SOLUTION
Avatar of Dmitriy Sky
Dmitriy Sky
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial