0

I opened up a port (23) on my server with netcat.

I then blocked this specific port with an IPTABLES Input rule.

Are there any tools at my disposal to determine that I do indeed have this port open behind my firewall? Epic Nmap scans/hacks etc? I'm pentesting my box.

Thanks.

2 Answers 2

1

The simple option is to telnet to the port for example:

telnet <your ip address> 23

If you get a connection, i.e. no timeout or refused message, your port is accessible.

5
  • Thank you for your comment. I know I have the port open behind my firewall and the firewall would indeed block any attempt at such a connection. I'm asking how a hacker could determine if a port is open even if it is filtered/blocked by a firewall.
    – Scandalist
    Oct 25, 2012 at 7:29
  • Ah, ok - I would offer that the answer is no in that case. If the hacker did in fact gain access to that machine or any other behind the firewall, then it's possible, but externally, I don't think so .. or at least I hope its not possible :) Oct 25, 2012 at 7:33
  • 3
    Best thing to do in that case is not to REJECT, but DROP. REJECT gives some indication that the machine exists at that address and that something is listening on that port - DROP just ignores the connection, meaning there should be no indication there's even a box at that IP.
    – Xyon
    Oct 25, 2012 at 7:33
  • Right, that makes sense. I suppose my real question is how could I keep these services accessible yet block port scans, ping probes etc - Rendering my server invisible to the common port sweeps of the internet. I would guess this is a fine art.
    – Scandalist
    Oct 25, 2012 at 7:41
  • @Scandalist: Port Knocking is one way to make a service available through the Internet without being visible to port scanners. VPN is another way. N.b. it's usually best to ask your real question in the question, not as a comment ;-) Oct 25, 2012 at 8:40
0

I make use of several external sites which attempt to connect to a port from outside your local network, such as the one at DNS tools. They usually have some tools I don't use, but they allow you to check a particular port. Depending on how you're setting up, this might be more useful than local telnet (for instance, if you want the port open locally but closed to the outside internet).

3
  • The thing is, I know the port is open behind the firewall. I question a hackers ability to determine this even though I am filtering the port.
    – Scandalist
    Oct 25, 2012 at 7:32
  • See my comment on the above answer. :)
    – Xyon
    Oct 25, 2012 at 7:35
  • 1
    Also see the Gibson Shields Up test. Feed it a port range and it'll tell you not only if it could connect, but what indication it gets from your box.
    – Xyon
    Oct 25, 2012 at 7:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .