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

Do I need to set any other rule than open outbound connections to port

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

  • 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, 2017 at 7:17
  • Telnet's default port is TCP 23.
    – Zac67
    Dec 1, 2017 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, 2018 at 16:37

2 Answers 2


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.


"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.

  • 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 110" will, for example, start a connection to the IMAP server on, and you can type commands as per the IMAP protocol and read the server's responses.
    – mere3ortal
    Dec 1, 2017 at 14:12
  • Port 110 is POP3, IMAP is 143 by default
    – Teun Vink
    Jan 31, 2018 at 7:33
  • @TeunVink Absolutely, thx!
    – Zac67
    Jan 31, 2018 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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