≡ Menu

CentOS / Red Hat Linux IP Forwarding How To

How do I enable IP forwarding under RHEL / Red Hat / Fedora / CentOS Linux operating systems?

You can easily turn on IP forwarding under Linux operating system by modifying Linux kernel variables (MIB).

Linux Enable IP Forwarding

Open /etc/sysctl.conf file using a text editor, enter:
# vi /etc/sysctl.conf
Set net.ipv4.ip_forward to 1, enter:

net.ipv4.ip_forward = 1

Save and close the file. Reload the changes by typing the following command:
# sysctl -p

See: How to setup Linux as a router for DSL, T1 line etc

Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:



{ 1 comment… add one }
  • HaboBabo May 24, 2014, 4:02 am

    uhm.. and where to put the ‘new’ IP?…

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: , , , , , , , , ,