GOOGLE Search

Google
 

Wednesday, March 26, 2008

Linux Tip No. 36: How to Enable IP Forwarding

Enable IP Forwarding

1. Check if IP Forwarding is enabled

Using sysctl:

[root@proxy ~]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0

or just checking out the value in the /proc system:

[root@proxy ~]# cat /proc/sys/net/ipv4/ip_forward
0

Value 0 means it is disabled.

2. Enable IP Forwarding on the fly

[root@proxy ~]#sysctl -w net.ipv4.ip_forward=1

or

[root@proxy ~]#echo 1 > /proc/sys/net/ipv4/ip_forward

the setting is changed instantly; the result will not be preserved after rebooting the system.


3. Permanent setting using /etc/sysctl.conf

If we want to make this configuration permanent the best way to do it is using the file /etc/sysctl.conf where we can add a line containing net.ipv4.ip_forward = 1

[root@proxy ~]#vi /etc/sysctl.conf 
# Controls IP packet forwarding
net.ipv4.ip_forward = 1


if you already have an entry net.ipv4.ip_forward with the value 0 you can change that 1.

To enable the changes made in sysctl.conf you will need to run the command:

[root@proxy ~]#sysctl -p /etc/sysctl.conf

Restart the network service

[root@proxy ~]#service network restart

10 comments:

Anonymous said...

Can anyone recommend the robust Software Deployment utility for a small IT service company like mine? Does anyone use Kaseya.com or GFI.com? How do they compare to these guys I found recently: N-able N-central remote support manager
? What is your best take in cost vs performance among those three? I need a good advice please... Thanks in advance!

Anonymous said...

I inclination not approve on it. I think nice post. Expressly the appellation attracted me to be familiar with the unscathed story.

Anonymous said...

Nice brief and this mail helped me alot in my college assignement. Say thank you you for your information.

Anonymous said...

I just found the website who discuss about
Several
home business ideas

If you want to know more here it is
home business reviews
www.home-businessreviews.com

Anonymous said...

Good dispatch and this post helped me alot in my college assignement. Say thank you you as your information.

Anonymous said...

Opulently I agree but I contemplate the post should secure more info then it has.

Anonymous said...

Nice fill someone in on and this mail helped me alot in my college assignement. Say thank you you for your information.

Anonymous said...

Approvingly your article helped me altogether much in my college assignment. Hats afar to you send, wish look audacious in the direction of more related articles in a jiffy as its sole of my pet topic to read.

Anonymous said...

[url=http://abcwatches.co.uk/]fake watches[/url]

ok replica watches review
chanel 5th ave
coach outlet store online
rolex yachtmaster 2 replica
rolex yachtmaster ii swiss replica

http://watchesshop24.co.uk/

Anonymous said...

Latest every ninety days [url=http://hermes.ruren.org/][b]エルメス 財布[/b][/url]
results, adapted at unswerving return rates, Hermes takings increased by [url=http://hermes.ruren.org/]エルメス バッグ[/url]
12.8% to 856.8 million euros, compared with 776.9 million euros in the that having been said indicate in 2012, an embroidery of more than 11% of [url=http://hermes.ruren.org/][b]hermes エルメス[/b][/url]
the fellow build participants keep in landscape, but compared with sales in the prime mercifulness of 2012, an spread of [url=http://hermes.ruren.org/]hermes エルメス[/url]
17.6%words, has slowed; at up to tryst the street rates, Hermes in the in the first place phase of the moon [url=http://hermes.ruren.org/][b]エルメス バッグ[/b][/url]
returns addition of 10.3%, during the span of transfer classify fluctuations come by the body 19 million euros. [url=http://hermes.ruren.org/]エルメス 財布[/url]
In summation, the mob's retail [url=http://hermes.ruren.org/][b]エルメス 財布[/b][/url]
way sales proliferation of 13.6%, the wholesale conduit sales multiply of 9.9%.