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

  • 0

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

Was this answer helpful?

« Back
Sign up for a newsletter

chat