Lab 4.1 Network Firewalls Vyos - zacharylongo/Tech-Journals GitHub Wiki

Firewall Zones Creation

In VyOS, you can create firewall zones to group network interfaces and apply policies to them. Here's how to create a firewall zone:

Enter configuration mode

configure

Create a new zone

set firewall zone name ZONE-NAME

Add interfaces to the zone

set interfaces ethernet eth0 firewall in ZONE-NAME set interfaces ethernet eth1 firewall in ZONE-NAME

Set the default policy for the zone

set firewall name ZONE-NAME default-action allow

Commit/Save the changes

commit

save

Note: Replace ZONE-NAME with the name you want to give the firewall zone, and eth0 and eth1 with the network interfaces you want to add to the zone.

Firewall Rule Creation

You can create firewall rules to allow or deny traffic based on various criteria, such as source and destination IP addresses, port numbers, and protocols. Here's how to create a firewall rule:

# Enter configuration mode

configure

Create a new firewall rule

set firewall name RULE-NAME rule 10

# Set the action (allow or deny)

set firewall name FIREWALL-NAME rule x action accept

Establish/Enable

set firewall name FIREWALL-NAME rule x state established enable

Set the source and destination addresses and ports

set source address 192.168.0.0/24

set destination address 10.0.0.0/24

set destination port 80

Set the protocol

set protocol tcp

# Commit the changes

<p>commit</p>

Notes

  • Make sure to make firewalls go both ways....
⚠️ **GitHub.com Fallback** ⚠️