IP Forwarding using IPtables
I want to do IP forwading using IPtables task is: I have to forward the request to a machine -- if the request is for a specific IP address (its NOT -from a specific address of host ) Do you mean you have a machine with a default policy of disallowing forwarding and you just want to allow any packets coming in from anywhere that are destined to go to eg. a.b.c.d? iptables -I FORWARD -d a.b.c.d -j ACCEPT
or do you want more sophisticated behaviour like: iptables -I FORWARD -p tcp -d a.b.c.d -j ACCEPT
Maybe even restricting the traffic further to only certain ports or interfaces. Or do you mean the packets meant for a.b.c.d should be redirected to some other address? It is hard to know what rules will work for you since it will depend on what rules already exist in your tables and how your machine is connected to other networks so I'm just guessing.
See Also
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|