Network Firewalls 1 - nicolas-tullio/Tech-Journal GitHub Wiki
Updating VyOS
VyOS documentation for updating VyOS here: https://docs.vyos.io
Configuring RIP
- set protocols rip interface [INTERFACE]
- set protocols rip network [NETWORK ID/MASK]
Firewall Zones creation
Create and link firewall zones to interfaces
- set zone-policy zone
zone name
interfaceinterface
Create firewalls for links, with a default drop
- set firewall name
fw name
default-action drop
Enable logging
- set firewall name
fw name
enable-default-log
Assign firewall to zone
- set zone-policy zone
interface
frominterface
firewall namefw name
To monitor firewall logs: tail -f /var/log/messages | grep _interface_
Firewall Rule creation
Create firewall rules:
- set firewall name
fw name
rule#
action accept - set firewall name
fw name
rule#
description"description"
- set firewall name
fw name
rule#
destination addressip
- set firewall name
fw name
rule#
destination port#
- set firewall name
fw name
rule#
protocol tcp
Firewall rule to allow established connections back out:
- set firewall name
fw name
rule#
action accept - set firewall name
fw name
rule#
state established enable
Debugging Firewall Blocks
Use tail -f /var/logs/messages
to see logs and troubleshoot from the information they provide
Exporting vyos configurations
- Generate the text file containing the configuration
show configuration commands | grep -v "syslog global|ntp|login|console|config|hw-id|loopback|conntrack" > fw-mgmt-week4.txt
- SCP this file to machine with Git installed
scp fw-mgmt-week4.txt [email protected]:/home/nicolas
- Move the file into the GitHub repository folder
mv fw-mgmt-week4.txt Tech-Journal/SEC-350/fw-mgmt-week4.txt
- Git add
git add fw-mgmt-week4.txt
- Git commit
git commit -m Week 4 firewall configs
- Git push
git push