ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Solved CentOS 7 enabling Telnet

    IT Discussion
    telnet centos firewalld troubleshooting ydmp yealink device management
    3
    15
    4.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dbeatoD
      dbeato @DustinB3403
      last edited by

      @dustinb3403 said in CentOS 7 enabling Telnet:

      I just figured it out, it's using the default port. 23 rather than the port I thought I added correctly.

      What if you create an IPTable forwarding from that 9090 port to the internal port 23? Does that work?

      DustinB3403D 1 Reply Last reply Reply Quote 0
      • DustinB3403D
        DustinB3403 @dbeato
        last edited by

        @dbeato said in CentOS 7 enabling Telnet:

        @dustinb3403 said in CentOS 7 enabling Telnet:

        I just figured it out, it's using the default port. 23 rather than the port I thought I added correctly.

        What if you create an IPTable forwarding from that 9090 port to the internal port 23? Does that work?

        How would I do that?

        dbeatoD 2 Replies Last reply Reply Quote 0
        • dbeatoD
          dbeato @DustinB3403
          last edited by

          @dustinb3403 said in CentOS 7 enabling Telnet:

          @dbeato said in CentOS 7 enabling Telnet:

          @dustinb3403 said in CentOS 7 enabling Telnet:

          I just figured it out, it's using the default port. 23 rather than the port I thought I added correctly.

          What if you create an IPTable forwarding from that 9090 port to the internal port 23? Does that work?

          How would I do that?

          Actually, something along this lines might be good:
          http://sharadchhetri.com/2014/12/08/change-telnet-server-port-number-centos-7-rhel-7/

          DustinB3403D 1 Reply Last reply Reply Quote 0
          • DustinB3403D
            DustinB3403 @dbeato
            last edited by DustinB3403

            @dbeato I'm already reading it, but systemd fails to restart the service with

             systemctl status telnet.socket
            ā— telnet.socket - Telnet Server Activation Socket
               Loaded: loaded (/usr/lib/systemd/system/telnet.socket; enabled; vendor preset: disabled)
               Active: failed (Result: resources) since Thu 2018-06-07 08:35:37 EDT; 14min ago
            	 Docs: man:telnetd(8)
               Listen: [::]:9090 (Stream)
             Accepted: 1; Connected: 0
            
            Jun 07 08:37:31 server systemd[1]: Starting Telnet Server Activation Socket.
            Jun 07 08:37:51 server systemd[1]: telnet.socket failed to listen on sockets: Permission denied
            Jun 07 08:37:51 server systemd[1]: Failed to listen on Telnet Server Activation Socket.
            Jun 07 08:37:51 server systemd[1]: Starting Telnet Server Activation Socket.
            Jun 07 08:40:15 server systemd[1]: telnet.socket failed to listen on sockets: Permission denied
            Jun 07 08:40:15 server systemd[1]: Failed to listen on Telnet Server Activation Socket.
            Jun 07 08:40:15 server systemd[1]: Starting Telnet Server Activation Socket.
            Jun 07 08:49:31 server systemd[1]: telnet.socket failed to listen on sockets: Permission denied
            Jun 07 08:49:31 server systemd[1]: Failed to listen on Telnet Server Activation Socket.
            Jun 07 08:49:31 server systemd[1]: Starting Telnet Server Activation Socket.
            
            1 Reply Last reply Reply Quote 1
            • dbeatoD
              dbeato @DustinB3403
              last edited by

              @dustinb3403 said in CentOS 7 enabling Telnet:

              @dbeato said in CentOS 7 enabling Telnet:

              @dustinb3403 said in CentOS 7 enabling Telnet:

              I just figured it out, it's using the default port. 23 rather than the port I thought I added correctly.

              What if you create an IPTable forwarding from that 9090 port to the internal port 23? Does that work?

              How would I do that?

              For the firewall rules this is what I would use:

              firewall-cmd --zone=public --add-port=9009/tcp --permanent
              firewall-cmd --reload
              semanage port -a -t telnetd_port_t -p tcp 9099
              

              Also are you modifying the following file?
              /usr/lib/systemd/system/telnet.socket

              DustinB3403D 1 Reply Last reply Reply Quote 0
              • DustinB3403D
                DustinB3403
                last edited by DustinB3403

                and the journalctl logs has

                -- Unit telnet.socket has begun starting up.
                Jun 07 08:50:48 server polkitd[713]: Unregistered Authentication Agent for unix-process:3613:205717 (system bus name :1.48, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.
                Jun 07 08:57:21 server firewalld[743]: WARNING: ALREADY_ENABLED: 9090:tcp
                Jun 07 08:58:16 server polkitd[713]: Registered Authentication Agent for unix-process:3803:250497 (system bus name :1.53 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/
                Jun 07 08:58:16 server polkitd[713]: Unregistered Authentication Agent for unix-process:3803:250497 (system bus name :1.53, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.
                Jun 07 08:59:03 server polkitd[713]: Registered Authentication Agent for unix-process:3820:255214 (system bus name :1.54 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/
                Jun 07 08:59:03 server systemd[1]: Reloading.
                Jun 07 08:59:04 server polkitd[713]: Unregistered Authentication Agent for unix-process:3820:255214 (system bus name :1.54, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.
                Jun 07 08:59:11 server polkitd[713]: Registered Authentication Agent for unix-process:3840:255990 (system bus name :1.55 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/
                Jun 07 08:59:11 server systemd[1]: telnet.socket failed to listen on sockets: Permission denied
                Jun 07 08:59:11 server systemd[1]: Failed to listen on Telnet Server Activation Socket.
                
                1 Reply Last reply Reply Quote 0
                • DustinB3403D
                  DustinB3403 @dbeato
                  last edited by

                  @dbeato said in CentOS 7 enabling Telnet:

                  @dustinb3403 said in CentOS 7 enabling Telnet:

                  @dbeato said in CentOS 7 enabling Telnet:

                  @dustinb3403 said in CentOS 7 enabling Telnet:

                  I just figured it out, it's using the default port. 23 rather than the port I thought I added correctly.

                  What if you create an IPTable forwarding from that 9090 port to the internal port 23? Does that work?

                  How would I do that?

                  For the firewall rules this is what I would use:

                  firewall-cmd --zone=public --add-port=9009/tcp --permanent
                  firewall-cmd --reload
                  semanage port -a -t telnetd_port_t -p tcp 9099
                  

                  Also are you modifying the following file?
                  /usr/lib/systemd/system/telnet.socket

                  Yes I've done all of this.

                  dbeatoD 1 Reply Last reply Reply Quote 1
                  • dbeatoD
                    dbeato @DustinB3403
                    last edited by

                    @dustinb3403 said in CentOS 7 enabling Telnet:

                    @dbeato said in CentOS 7 enabling Telnet:

                    @dustinb3403 said in CentOS 7 enabling Telnet:

                    @dbeato said in CentOS 7 enabling Telnet:

                    @dustinb3403 said in CentOS 7 enabling Telnet:

                    I just figured it out, it's using the default port. 23 rather than the port I thought I added correctly.

                    What if you create an IPTable forwarding from that 9090 port to the internal port 23? Does that work?

                    How would I do that?

                    For the firewall rules this is what I would use:

                    firewall-cmd --zone=public --add-port=9009/tcp --permanent
                    firewall-cmd --reload
                    semanage port -a -t telnetd_port_t -p tcp 9099
                    

                    Also are you modifying the following file?
                    /usr/lib/systemd/system/telnet.socket

                    Yes I've done all of this.

                    Interesting, I am not sure then.

                    DustinB3403D 1 Reply Last reply Reply Quote 0
                    • DustinB3403D
                      DustinB3403 @dbeato
                      last edited by

                      @dbeato I've even modified the predefined service at /usr/lib/firewalld/services/telnet.xml to use port 9090 and the service still fails to load.

                      1 Reply Last reply Reply Quote 1
                      • DustinB3403D
                        DustinB3403
                        last edited by

                        And I got the port forwarding to work.

                        firewall-cmd --zone=public --add-forward-port=port=9090:proto=tcp:toport=23

                        I can now telnet to my server on port 9090 (which forward to 23).

                        dbeatoD 1 Reply Last reply Reply Quote 2
                        • dbeatoD
                          dbeato @DustinB3403
                          last edited by

                          @dustinb3403 said in CentOS 7 enabling Telnet:

                          And I got the port forwarding to work.

                          firewall-cmd --zone=public --add-forward-port=port=9090:proto=tcp:toport=23

                          I can now telnet to my server on port 9090 (which forward to 23).

                          Nice!

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post