Skip to content

How to check rules on VyOS

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 | grep to filter output for specific rules
  • Use show configuration commands for a CLI-friendly format
  • Check rule hit counts with the statistics option to see which rules are actively matching traffic
  • Use monitor firewall for real-time firewall logging

What specific type of rules are you looking to check?

Published inUncategorized

Be First to Comment

Leave a Reply