To check rules on VyOS, you’ll use different commands depending on what type of rules you want to view:
Firewall Rules
Show all firewall rules:
show firewall
Show specific firewall ruleset:
show firewall name <ruleset-name>
show firewall ipv6-name <ruleset-name>
Show firewall statistics:
show firewall statistics
NAT Rules
Show NAT source rules:
show nat source
show nat source statistics
Show NAT destination rules:
show nat destination
show nat destination statistics
Configuration Mode
View configuration (from operational mode):
show configuration
show configuration commands | grep firewall
show configuration commands | grep nat
From configuration mode:
configure
show firewall
show nat
Policy-Based Routing
Show policy routes:
show policy route
Quick Tips
- Add
| grepto filter output for specific rules - Use
show configuration commandsfor a CLI-friendly format - Check rule hit counts with the
statisticsoption to see which rules are actively matching traffic - Use
monitor firewallfor real-time firewall logging
What specific type of rules are you looking to check?
Be First to Comment