Gatsby Default StarterGatsby logo

#Network

Virtual [[Classes/Network/Firewall]] OS - Linux based FreeBSD Most used opensource Firewall

Installing on VMware Workstation 17 pro We used Bridged as the connection time

After installation

we choose Edit > Virtual Network Editor

  • we add a second network card and put it on vmnet2 (because we've put the other machines on the vmnet2 as well)

VMNet0 > Bridged > We choose the "Intel wifi driver" at this point.

![[Pasted image 20240306153516.png]]

rules in firewall

![[Pasted image 20240306155947.png]]

to block* to whitelist or blacklist address;

![[Pasted image 20240306160148.png]]

Exercise

block 192.168.0.1

accept 192.168.1.0 /24

block ICMP echo reply

Firewall Settings with [[pfSense]]

  • Setting up pfSense replaces the router VM
  • Now it's the router and we do the firewall settings on it
  • We disabled the DHCP settings when installing because we have already put a static IP to our client.
  • From the client we ping the gateway first !! always
  • We go the a web browser in the client and go the gateway address (gateway is always the router address)
  • admin and pfsense for the login credentials in the web browser.
  • ![[Pasted image 20240327103425.png]]
  • we enter the formation.lan and no DNS needed because automatically done by the main router connected
  • we choose out timezone
  • ![[Pasted image 20240327103752.png]]
  • in the next step we remove the tick from the latest 2 options
  • ![[Pasted image 20240327111858.png]]
  • we're in
  • ![[Pasted image 20240327104159.png]]
  • we can add widgets

To activate DHCP server : Services > DHCP Server > LAN

![[Pasted image 20240327110857.png]]

Difference between NAT and Firewall Rules NAT : is only for one machine Rules : is for all the network (WAN)

ICMP : Internet Control Message Protocol ?? ==developer==

Authorizing SSH to Srvlx01 through NAT

We add a rule to NAT ![[Pasted image 20240327112458.png]]

Installing DHCP to the server though SSH

sudo apt install isc-dhcp-server if user doesn't have the right we add it in nano /etc/sudoers : with user ALL: etc...

sudo nano /etc/dhcp/dhcpd.conf to see the DHCP settings and edit them

Configuring [[DHCP]] Settings

we will send this file into the server with SSH (don't put comments like this in this image) ![[Pasted image 20240327114743.png]]![[Pasted image 20240327122612.png]] no space before the parantheses !

  • we connect to the WAN address of the firewall/pfSense through the FTP client

  • and copy the dhcpd.conf file to the router

  • ![[Pasted image 20240327115407.png]]

  • WAN address is found on the Dashboard (172.16.254.129 in my case)

  • ![[Pasted image 20240327115435.png]]

  • we will launch the DHCP service / daemon to activate it

  • to launch the service we enter sudo systemctl start isc-dhcp-server.service

  • to verify if it's active sudo systemctl status isc-dhcp-server.service

  • ![[Pasted image 20240327123442.png]]

Now we see that it works on the client machine :

  • ![[Pasted image 20240327123524.png]]