• 1 hour ago

Category

🤖
Tech
Transcript
00:00hi how are you doing dudes we are not so far from 1000 subscribers for those who subscribe thank you
00:06very much for those who still still didn't please subscribe like share and comment one of the most recommended things
00:14to do after installing any operating system is to enable or install a firewall since it reduces the risk of
00:22getting hacked or compromised when it comes to bsd
00:28they are known with their firewall which is PF some people install BSDs simply for that they are quite strong
00:38and secure and some famous network equipment is based off of BSD and mostly the firewall which is PF as
00:51I said so let's install it on this free BSD
00:57box that I have since I do not have it installed you make a file under slash etc slash pf
01:07.conf and in my case I made it like this for the interfaces network interfaces which you can find by
01:26running if config in my case it's em0
01:34WLAN 0 EM 0 is for the wired connection WLAN is for the wireless one this will enable the firewall
01:47for them drop most of the connections in case the ports are not open for them and when it comes
01:55to SSH and Telnet the ports are open and it accepts the connections and for Telnet it accepts them only
02:06from
02:07the local network of the computer you need to know what is the network address in my case it's 10
02:18.1.0.0 and you need to know the subnet which you can add it by forward slash and a
02:26number it can it is mostly 24 16 and sometimes you can customize it and there are the types of
02:39network local network IP addresses I believe that 192.168.something.something cannot be less than 24 in case it
02:52didn't change correct me if I'm wrong for 10.something.something like me it can be 8 and so on
03:01and there is also 172.16.something.something so
03:09in my case this is a simple configuration file where I accept the connections from port 22 and port 23
03:19port 23 is for telnet for those who have the firewall enabled on their FreeBSD boxes and installed telnet like
03:32me you need to add this to your pf.conf the next command is kld
03:40load pf and then pfctl dash nf slash etc slash pf dot conf all right in case you got an
04:03error like uh net uh failed to open netlink no such file or directory it's because you didn't load the
04:15kernel module you must
04:18load it in order to run this command successfully the next command is sysrc pf underscore enable equals yes all
04:41uppercase within double quotation mark enter and then sysrc pf log
04:56underscore enable equals not that different with the first one yes is uppercase all uppercase within double quotation mark enter
05:13and then service pf start all right that means it is started service let's check the status if it is
05:32possible yes all right to see
05:39the active filter rules we run pfctl dash sr says command not found pf not pt pf like this yes
05:56uh for not and redirection dash and sn nothing this is for everything sa it will probably we got a
06:17bunch of details here
06:40I'm cheating here. I'm looking at the commands on this computer. And if I face any problem, I check in
06:47it. I'm sorry for that. Dash SI here. All right. SS. Actually, I know nothing about this. It's my first
06:57time trying it. VVSR like this. And we got more verbose output. No.
07:08I don't know, maybe for SR it's more verbose, because usually dash V is for more verbosity, and the more
07:15you add it, in case it's possible, the more you get more output. There is also SR SN, yeah, that's
07:36what was suggested. Anyway, I'm signing out, and peace.

Recommended