What is IP forwarding in Linux? How to enable IP forwarding?

IP forwarding helps you to set up the OS to work as a router. You can set IP forwarding when you have a system set up that has two different networks and you are looking to pass traffic from one network to another one. It is very easy to set up IP forwarding on Linux OS. Please refer to the following steps to enable IP forwarding on Linux OS.

  1. Open the file /etc/sysctl.conf in your favorite text editor.

    nano /etc/sysctl.conf
  2. Uncomment the below line.

    net.ipv4.ip_forward=1
  3. Save the file with ctrl+x, then press y, and then press enter. Finally, run this command.

    sysctl -p

Related Articles

How to Setup NTP Server in CentOS?

NTP enables the automatically sync your system time with a remote server. With the help of NTP...

How to use gzip in Linux?

Linux has many commands line tools to compress/decompress files and gzip is one of them. In this...

How to Install SHOUTCast Radio Server on Linux VPS?

This tutorial will assist you to install SHOUTcast Distributed Network Audio Server (DNAS 2.0) in...

How to Monitor Network Usage with nload in Linux?

You may need to monitor your network bandwidth usage on daily basis. In this case, nload will...

How to Enable Root User in Ubuntu Server?

Please refer to the below steps to enable root user in ubuntu. Login to your ubuntu server...

  • 0 Users Found This Useful

Was this answer helpful?