- [Voiceover] In this lesson, we'll be changing
our Ubuntu router host operating system settings
to forward packets from its internal network interface
to the external network interface.
This allows us to forward packets from the Ubuntu host
connected to the router host to the internet.
Let's start by checking
the current operating system settings.
Type more forward slash proc sys forward slash net
forward slash ipv4 forward slash IP underscore forward
press enter and the output is zero.
Zero in computer science means false.
What this indicates is that at the operating system level
forwarding is disabled.
By the way "More" is a Linux command to show
the content of a file.
Now our mission is to enable forwarding.
To accomplish this mission
all you have to do is set the proc sys net ipv4
IP underscore forward variable to one.
How do you do that?
You use the echo command.
The echo command takes an input
and outputs the same thing.
Type echo space one.
If you press enter
the command will print the input, which is one.
Press enter.
One is printed as predicted.
Before going any further let's sign in as root first
because the command we're about to use
requires route access.
Type pseudo dash I.
Press enter.
Type echo one space and the greater than sign.
The greater than sign in this case
is called redirection in Linux
and means that whatever is coming from the previous command
is going to be passed to the next command.
Type forward slash proc sys forward slash net
forward slash ipv4 forward slash IP underscore forward.
Press enter.
Essentially what just happened here
is the IP underscore forward variable
is set to the value passed by echo one.
The initial value was zero.
Therefore the new IP underscore forward value
should now be set to one.
Let's see if the value has been actually changed.
type more space proc sys net ipv4 IP underscore forward
and press enter.
As you can see, the value is now set to one.
If you're using Azure VMs
please don't forget to enable IP forwarding
in the VM setting too.
Now we are ready to move on to the next step
which is changing the net filter settings.