First time here? Check out the FAQ!
x

How to enable IP forwarding on a Debian machine?

0 votes
asked by
retagged by

How to enable IP forwarding on a Debian machine?

2 Answers

0 votes
answered by (309k points)
edited by

Open Terminal and log into root using sudo su followed by your password then type: pico /etc/sysctl.conf. If you don't have pico, you might want to install it using: apt-get install pico. In the .conf file, identify line that has the following: net.ipv4.ip_forward and change it to 1 instead of 0. Press Ctrl+O followed by CTRL+X then from the same Terminal window, use: sysctl -p to restart the interfaces and you're done.

0 votes
answered by (264k points)
edited by

Editing the sysctl.conf file should give you the following screen:

description

As you can see, I have edited the file with the IP forwarding; and after I've removed the # I have pressed Ctrl+O to save the file.

Next you want to restart the interface with the sysctl -p command:

description

You now have IP forwarding enabled.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...