Check Linux IP Forwarding for Access Server Routing
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.
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:
Connect to the console and get root privileges.
Open the sysctl.conf file in the nano text editor:
nano /etc/sysctl.confUncomment or add this line:
net.ipv4.ip_forward=1Press CTRL_x, Y, then ENTER to save and exit the file.
Run this command:
sysctl -pYou've turned on IP forwarding.