I'm going to show you how to set up a security group and a security group is like a firewall, except
it's stateful and you don't have that.
So before you can have stateful and stateless firewalls.
So a stateful one will allow airports in.
Some of traffic can get in.
It will then allow the traffic back out or whatever ports it needs to go outsole, whereas a stateless
one, you have to say inbound and an outbound rule to ensure the flow of traffic.
So it's one of the nice features have security groups is it acts like a firewall.
But sometimes you don't have to worry about ephemeral ports.
Well, so what's going out?
Because as long as you allow inbound, it will allow outbound on the same port.
With that said and done, let's jump into houses, set one up.
So we're going to create a new folder.
And I'm gonna call this S.G. Short Security Group to speed things up.
I'm gonna go to the easy to folder and copy means T.F..
Because this is going to act as a base.
And next, what we're going to do is set up the security group.
And by now you should recognize the pattern.
It's going to be resource and in quotes, resource type.
And for A.W., a security group is a W.S. on the school security and the school group that we give it
a name.
I'm Nikko's Web traffic.
Me creates a curly braces.
So give it a name and I'm going to call this allow HECS.
And then there are two blocks.
We need to create ingress and egress.
So this is going to allow our traffic in.
And this is going to allow our traffic out.
We'll be all stateful.
I do think it's good practice to set inbound and outbound rules just so you can rule it out when something
doesn't work.
So now what we need to do is that from port cities, HCN, UBS.
So it's going to be full first.
And our two ports and witness decided to fulfill very I'll include a link to the documentation, because
I've had this question a couple of times from students asking why do we have to put in the port twice?
Why do we have a from port to port?
Well, what might happen is sometimes you may want to use a range of ports.
So, for example, you might have the femoral ports, so you might go port.
Thirty thousand to you might say sixty thousand.
And instead of doing this, manually created an ingress rule for every single port.
Instead, what you can do is create a range.
And that is why we have the from and to port.
So, so that's full for free.
And we also set out to fulfill frie.
So that is how you'd set a single port.
Next meets certain protocol.
This is gonna be TCAP.
We need to allow the IP addresses.
We do that.
We side blocks.
So it's obvious the traffic.
We talk insider on the school blocks equal to an inside double quotes.
So allow it to all traffic zero zero zero zero, slash zero.
And again, this is a list.
So you could put in a comma.
And if you want to allow your pager specifically, you could put it in here and you could do it with
a slash 30 to.
And what we can do is copy paste this, because this is identical for the egress.
Next up, we need to do is link our security group to our easy to instance and to do that, which up
in security groups and we can see also complete is helping me out here equal to.
And we type in resource.
Eight of us on the school security and the school group taught.
And the name we said is Web traffic.
Dot.
And the name.
So we just type in dot name.
The attributes Narvo happy with this.
Let's go to View Terminal.
I don't mean to minimize, explore and get back a level and c.D into security group.
Now let's run.
Terrible.
It's.
Excellent.
And now let's run.
Terrible plight.
So let's quickly check it out.
It's going to create ARACY to instance, and we can also see it's creating a security group.
Let's go ahead and type in.
Yes, go ahead and creates it.
Excellent.
Now we go to the council and we'll refresh this.
We can see these two instance and we can see the security group allow HTP s.
Give a little description managed by telephone, but that is what we've gone ahead and created.
And it's also linked to our InSitu instance.
So now we can go ahead and destroy it.
So to do that terrible Terfel destroyed.
And so, yes.
Excellent.
There we go.
That's not been destroyed.
About also wraps up this video.
I look forward to seeing you in the next one.