Skip to content

Commit

Permalink
semanage-port: add port range example (#15384)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyqsimon authored Jan 1, 2025
1 parent 8c47474 commit 77a75ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pages/linux/semanage-port.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

`sudo semanage port {{-a|--add}} {{-t|--type}} {{ssh_port_t}} {{-p|--proto}} {{tcp}} {{22000}}`

- Add a user-defined rule that assigns a label to a protocol-port-range pair:

`sudo semanage port {{-a|--add}} {{-t|--type}} {{http_port_t}} {{-p|--proto}} {{tcp}} {{80-88}}`

- Delete a user-defined rule using its protocol-port pair:

`sudo semanage port {{-d|--delete}} {{-p|--proto}} {{udp}} {{11940}}`

0 comments on commit 77a75ff

Please sign in to comment.