PROFESSOR: We're in Windows Server 2019, let's go ahead
and take a look at how we can open a port on the firewall.
So let's go down to the search box, and just type in firewall.
And we'll click on Windows Defender Firewall.
From here we'll click on Advanced Settings.
And we can see on our inbound rules all the ports that are allowed.
Now if you want to allow a port or a rule, that's here,
just right click on and choose Enable.
To change your mind, right click on it, and choose Disable.
But most the time we're here because we want to add a custom rule.
So let's go ahead and go to the top right, click on New Rule.
And from here we're going to choose a port, that's
the most common, although you can choose a program if you want,
you just have to know the path to that program.
Go ahead and click Port and choose either TCP or UDP.
You can choose all ports, which would basically
open up the firewall totally, which isn't a good idea,
or go to Specific Ports.
So let's just say we're going to put in port 444.
Let's go ahead and click Next.
We're going to allow the connection, Next.
We're going to choose any different type of network connection, Next.
And we'll call that Port444, so it's easy to find, and click Finish.
So you see it puts that port at the top of the screen, which is great.
Let's go ahead and double click on it.
And then we're going to go to where it says Advanced.
And I want to make sure that you realize, by default, you're only
going to be allowing the port traffic to the local subnet
that you're on.
If you want to allow traffic in from other subnets in your office,
or if you want to allow traffic in from the internet,
you have to click on Allow Edge Traversal, click Apply.
Now you also have to open up the port on your firewall itself,
and forward that to the server.
But if you don't do Allow Edge Traversal, then most likely
the server will kick it out anyway, because it knows that it
did not come from the local subnet.
Go ahead and click OK.
And now our port, our custom port that we created, has been added,
and it's at the top of the list.