Results 1 to 4 of 4

Thread: Firewalld - Ports - /etc/services

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,037

    Default Firewalld - Ports - /etc/services

    Hello.
    Question
    If you make your own /etc/services files by modifying and/or add new ports. Applications are supposed uses theses ports ( from my /etc/services ).
    My /etc/services Examples
    Code:
    .........
    .........
    ftp                21/sctp      # FTP  [Randall_Stewart] [RFC4960]
    ssh                22/sctp      # SSH  [Randall_Stewart] [RFC4960]
    #ssh                   22/tcp       # The Secure Shell (SSH) Protocol  [RFC4251]
    #ssh                   22/udp       # The Secure Shell (SSH) Protocol  [RFC4251]
    #telnet                23/tcp      # Telnet  [Jon_Postel] [RFC854]
    #telnet                23/udp      # Telnet  [Jon_Postel] [RFC854]
    #                  24/tcp       any private mail system  [Rick_Adams]
    .........
    .........
    #
    ssh             12345/tcp       # [JCD] - The Secure Shell (SSH) Protocol  [RFC4251]
    ssh             12345/udp       # [JCD] - The Secure Shell (SSH) Protocol  [RFC4251]
    .........
    .........
    #
    telnet          23456/tcp       # [JCD] - The Secure Shell (SSH) Protocol  [RFC4251]
    telnet          23456/udp       # [JCD] - The Secure Shell (SSH) Protocol  [RFC4251]
    #
    #
    I may connect with ssh from my computer to myself on the same computer.
    But I was not able to connect from another computer on the local network.
    (No change in the initial configuration of firewalld)
    I have to add the port manually
    Code:
    firewall-cmd --zone=public --add-port=12345/tcp --permanent
    firewall-cmd --zone=public --add-port=12345/udp --permanent
    firewall-cmd --reload
    A reboot was necessary ??

    Any comments are welcome.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  2. #2
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,134

    Default Re: Firewalld - Ports - /etc/services

    “/etc/services” is of limited use. It cannot be trusted and few services use it actively.

    The listening IP addresses and ports for sshd are defined in “/etc/ssh/sshd_config”.

    After modifying “/etc/ssh/sshd_config” restart sshd.
    Code:
    # systemctl restart sshd
    Firewalld enables you to change running and permanent rules.
    ~Thank you for sharing an interesting problem.
    --
    slàinte mhath,
    rayH

  3. #3
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Firewalld - Ports - /etc/services

    Quote Originally Posted by jcdole View Post
    If you make your own /etc/services files by modifying and/or add new ports. Applications are supposed uses theses ports ( from my /etc/services ).
    You've completely misunderstood what /etc/services file is - it's simply a list of services that may be used on the computer, a sort of a catalogue that applications can use to lookup what service might be running on a port.

    Changing the numbers on this file does not activate, move or otherwise manipulate any services and you should not change this file at all apart from very explicit situations.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  4. #4
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,037

    Default Re: Firewalld - Ports - /etc/services

    Thank you every body for helping
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •