IP forwarding helps you to set up the OS to work as a router. For example, you can set IP forwarding when you have a system that has two different networks and are looking to pass traffic from one network to another.
It is quite simple to set up IP forwarding on Linux OS, which you can do by implementing the following steps –
1. Open the /etc/sysctl.conf file in your preferred text editor.
2. Uncomment the below line –
3. Save the file with ctrl + x, press y, and enter.
4. Finally, run this command –