1

I have a firewall whose configuration is to block any connection, inbound or outbound, by default.

I want to telnet from within the firewall to a server outside of it.

Let's assume I want to telnet port 12 on a server whose IP is 34.56.78.90

Do I need to set any other rule than open outbound connections to port 34.56.78.90:12?

In other terms, does Telnet use other ports than the port it is trying to connect to?

3
  • No, you don't need to open any other port. Opening the port that you want to connect to it with Telnet is enough. (Note that Telnet default port number is 21) Oct 2 '17 at 7:17
  • Telnet's default port is TCP 23.
    – Zac67
    Dec 1 '17 at 11:56
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Feb 21 '18 at 16:37
1

No. If you open Port 12 for outbound traffic, then the firewall will recognize your outgoing request as a valid connection and the inbound replies will be accepted too.

Firewalls usually implement stateful inspection. It means that the firewall analyzes packets down to the application layer and monitors incoming and outgoing packets, so incoming packets constituting a proper response for outgoing requests are allowed through the firewall.

1

"open port" can have both meanings "allow connections to external IP on port x" or "allow connections from outside to internal IP y on port x".

What you need is to allow connections to any external IP address to TCP port 23. Of course, telnet can be accepting connections on any port it is configured to, so you may need to allow another port.

Ports 12 for both TCP and UDP are unassigned and 21 as per Abraham's comment is used for FTP control.

3
  • The telnet protocol (RFC 854) uses port 23 by default. On the other hand, the "telnet" program installed on computers can be used to connect to any TCP port on the remote host. "telnet 34.56.78.90 110" will, for example, start a connection to the IMAP server on 34.56.78.90, and you can type commands as per the IMAP protocol and read the server's responses.
    – mere3ortal
    Dec 1 '17 at 14:12
  • Port 110 is POP3, IMAP is 143 by default
    – Teun Vink
    Jan 31 '18 at 7:33
  • @TeunVink Absolutely, thx!
    – Zac67
    Jan 31 '18 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.