How do I disable/enable packet forwarding?


	For 4.1.x:
	Pick one of the following methods:

 	adb -k -w /vmunix /dev/mem
	ip_forwarding?
	_ip_forwarding:
	_ip_forwarding: 0               = unimp         0x0

	ip_forwarding/w -1      <- changes in running kernel only!
	ip_forwarding?w -1      <- changes running kernel and disk image

	or 

	In your kernel configuration file, insert the following line:

	options "IPFORWARDING=-1"

	Note: The above example disables packet forwarding.

	Here is a list of IP forwarding options
	(from /usr/kvm/sys/netinet/in_proto.c) 
		ip_forwarding = -1  -- never forward; never change this value.
		ip_forwarding =  0  -- don't forward; set this value to 1 
				       when two interfaces are up.
	        ip_forwarding =  1  -- always forward.

	For Solaris2.3:

	To disable ip_forwarding:

		 % ndd -set /dev/ip ip_forwarding 0

	To enable ip_forwarding:

		 % ndd -set /dev/ip ip_forwarding 1

	To reset it back to defaults:

		 % ndd -set /dev/ip ip_forwarding 2
	

Go to the index previous next