Skip to main content

Is IP Forwarding Enabled?

Question: What is IP forwarding, and how do I enable it on Linux?

Answer:

IP forwarding allows a system to route traffic between networks. An example use is a system sitting between two different networks that needs to pass traffic between them.

Important

Access Server always ensures IP forwarding is enabled by default, so it is unnecessary to implement this on the Access Server installation itself.

On most Linux systems, you can turn on IP forwarding by editing the /etc/sysctl.conf file. For example, follow these steps on Ubuntu/Debian:

  1. Connect to the console and get root privileges.

  2. Open the sysctl.conf file in the nano text editor:

    nano /etc/sysctl.conf
  3. Uncomment or add this line:

    net.ipv4.ip_forward=1
  4. Press CTRL_x, Y, then ENTER to save and exit the file.

  5. Run this command:

    sysctl -p
    • You've turned on IP forwarding.