hello everyone my name is Luis and I am
the commentator for SSN coming to you
for part two of the new DHCP the new
linux router tutorial set so in this one
will be going over building the firewall
and just getting it just getting the
basics all set up and making sure that
our client can actually get to the
outside and you know paying other hosts
that are outside of its network and all
that fun stuff right and that's pretty
much this is pretty much the bulk so in
the rail 7 or sent to a7 world we have
firewall d i'm not completely familiar
with firewall d yet but that will be a
video in the future that i'll touch up
on on how to on how to get it to work
with nad and forwarding and all that
stuff
but for now we have to fall back to the
old style and thankfully they allow you
to fall back to the old style because
because you kind of have to have you
kind of have to have the old style
anyway because every environments
different right so where I work we don't
use firewall D we actually fall back to
the old way right so first and foremost
let's install iptables
services and iptables utils all right
those are the first two things that we
need right so then
system CTL stop firewall D system CTL
disable firewall D systemctl enable
iptables systemctl start IP tables and I
think that should be sufficient enough
and there should be a test file ready
for us to modify so check add ceases
config IP tables yep we are ready to go
so technically you're able to actually
you know you can run the commands on on
the command line to build to build the
NAT firewall if you really want to I'm
the kind of person that likes to just do
it all manually and get it done but in
the video comments I will show and I
will show the applicable commands or
hell I can probably just show it now so
let's make sure all right so then that
table is there so all we'd have to
really do is do
I be tables st NAT - capital a post
routing and since we're saying what's
the what is the interface again ENS when
I - okay so IP tables t NAT a post
routing ons 1 9 2 J masquerade and then
let's make sure it went in there cool
that's pretty much it right IP tables
save and so we can see that it generates
this at the top and that's pretty much
all we need so I guess we'll go ahead
and actually save it might as well right
so let's go ahead and open up the file
itself and what I like to do is I
actually like to take this input line
and turn it to drop but we're going to
leave it we're going to leave these two
lines reject right so now what we'll
need to do is we'll have to add a couple
of forward rules so above that reject
forward rule let's make a new lines a
forward so the inbound the the input
interface here that we need to put would
be one ninety two so NS one I - Oh DNS 2
to 4 which is the LAN - M state we're
basically saying that anything any
connection that's related established
we'll be accepted and then we're going
to say that anything from the inside out
so you know switch the interface
declarations here we just want to say
accept pretty much it right there right
let's go ahead and save the file and
then go ahead and restart a few tables
pretty straightforward right there
alright so the next thing we have to do
is we need to modify a stasis ETL conf
file right so the the original file is
still there which is at CSIS ETL
conference it's still there and it's and
it still gets called there's a little
note at the top and it kind of says hey
you know you can enter the settings here
or you can make a separate comp file I
won't make a separate cop file I'll just
go ahead and put it in here so we need
to put net ipv4 dot IP underscore
forward equals one save it
this is CTL dash p and that's about it
so let's go to our
let's go to the machine that got its IP
from the last video or not if I can give
it the right my P for God's sakes there
we go
all right so let's make sure we can
paint Google cool so now we can paint
Google I should be able to ping yep cool
so it looks like so far so good
yep perfect so it looks like everything
is working out exactly how we wanted to
do and that's pretty much it with the
firewall portion so the next video will
go over setting up remote access turning
off not turning off but switching the
port for SSH and you know creating a
user that he will be the only one that
can get too rude and stuff like that
we'll we'll touch up on little things
like that
so I hope you enjoyed this part of the
tutorial see you in the next one