1844431 Members
3422 Online
110233 Solutions
New Discussion

IP forwarding

 
Indrajit Bhagat
Regular Advisor

IP forwarding

How to check if ip_forwarding has enabled or not? if not how to set/enable it?
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: IP forwarding

Shalom,

vi /etc/rc.config.d/nddconf

All settings will be revealed in there. Scan the file for the word forward.

If you just installed the system it will not be set on.

It can be set on temporarily with the ndd command and permanently in the file listed above.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Payne_2
Honored Contributor

Re: IP forwarding

Indrajit,

ndd -get /dev/ip ip_forwarding

will give you the currently set value. (A vlaue of 0 means it's off, 2 means on.)

To set it right away (to off in this example)

ndd -set /dev/ip ip_forwarding 0

As SEP said, you can set it permanently in /etc/rc.config.d/nddconf, which does a pretty good job of explaining itself, unless you have removed the HP default comments in the file.

ndd has some built in documentation:

ndd -h supported
ndd -h unsupported

These 2 comments will list a number of ndd options with a brief explaination of what they do. You can get more detailed information:

ndd -h ip_forwarding

ip_forwarding:

Controls how IP hosts forward packets: Set to 0 to inhibit
forwarding; set to 1 to always forward; set to 2 to forward only if the number of logical interfaces on the system is 2 or more. [0,2] Default: 2

Hope it helps

John
Spoon!!!!