ripnetdocs

List Rules

Lists firewall rules.

-5
ripnet --firewall-list
ripnet --firewall-list
ripnet -5

Add Rule

Adds a firewall rule to a chain.

-6 RULE -9 CHAIN
ripnet --firewall-add RULE --chain CHAIN
ripnet --firewall-add "-p tcp --dport 22 -j ACCEPT" --chain INPUT
Defaults
  • chain: empty unless --chain is supplied

Delete Rule

Requests deletion of a firewall rule.

-7 RULE
ripnet --firewall-delete RULE
ripnet --firewall-delete "INPUT -p tcp --dport 22 -j ACCEPT"
Notes
  • The dispatcher currently calls firewall_delete(chain, port), so rule text is parsed but not passed through as text.

Flush Chain

Flushes a firewall chain.

-8 CHAIN
ripnet --firewall-flush CHAIN
ripnet --firewall-flush INPUT
ripnet -8 INPUT

Block IP

Blocks an IP address.

ripnet --block-ip IP
ripnet --block-ip 192.168.1.100

Unblock IP

Removes an IP block.

ripnet --unblock-ip IP
ripnet --unblock-ip 192.168.1.100

Block TCP Port

Blocks a TCP port.

ripnet --block-port PORT
ripnet --block-port 22
Notes
  • The dispatcher always passes protocol tcp.

Unblock TCP Port

Removes a TCP port block.

ripnet --unblock-port PORT
ripnet --unblock-port 22