View previous topic :: View next topic |
Author |
Message |
bulletbill22 n00b
Joined: 15 Oct 2022 Posts: 34
|
Posted: Thu Jul 11, 2024 7:17 pm Post subject: What services does nftables know the ports of? |
|
|
For example, to accept ssh, http, and https traffic you can use Code: | tcp dport {ssh,http,https} accept | instead of using Code: | tcp dport {22,80,443} accept | What other services can be named rather than using ports? |
|
Back to top |
|
|
pa4wdh l33t
Joined: 16 Dec 2005 Posts: 881
|
Posted: Thu Jul 11, 2024 7:22 pm Post subject: |
|
|
nftables itself uses only port numbers, i expect (but did not check the code) it uses the system resolver for service names which uses /etc/services by default. _________________ The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world
My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5084 Location: Bavaria
|
Posted: Thu Jul 11, 2024 9:11 pm Post subject: |
|
|
pa4wdh wrote: | nftables itself uses only port numbers, i expect (but did not check the code) it uses the system resolver for service names which uses /etc/services by default. |
Yes ... the same is true for /etc/protocols ... so you can use names like TCP and UDP (instead of its numbers 6 and 17). _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
|