Bookmark and Share

Author Topic: How does Port Tester work?  (Read 5630 times)

0 Members and 1 Guest are viewing this topic.

Offline Amato

  • PcWinTech Jr. Member
  • Join Date: Apr 2014
  • Posts: 3
  • Karma: 0
How does Port Tester work?
« on: April 04, 2014, 08:47:37 AM »
Hello,
  I am a new user of the Simple Port Tester, and I want to ensure I understand how the Simple Port Tester works.

I set the IP address to the only physical connection located on my PC.  I then scanned ports 22, 23, 80, and 8080.  I also was performing a Wireshark capture.  All the ports failed (as expected), but I wanted to ensure the tool was operating correctly. 

1) While the port scanning was happening, I was observing the firewall logs.  I saw IP address 208.113.208.159 attempting to communicate with my router's IP address on ports 22, 23, 80, 8080.

2) After analyzing the Wireshark capture, I observed that my PC was communicating to IP address 205.196.208.221 on port 80 (http).  The TCP stream showed that my PC was communicating to Host: www.pcwintech.com and was issuing the following GET request:
   /port_test2.php?result=test&port=22 HTTP/1.1


Questions:
1. Why are 2 different IP addresses used (208.113.208.159 and 205.196.208.221)?
2. Is the below procedure the correct process of what is happening when using the port tester tool?
    a. PC running Port Tester tool communicates to PC-WinTech server to inform what TCP/UDP port to use.  Information is sent within http (port 80 or 8080)
    b. PC-WinTech server tries to open the specified port by communicating to the far-end router
 

PcWinTech.com Forums

How does Port Tester work?
« on: April 04, 2014, 08:47:37 AM »

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: How does Port Tester work?
« Reply #1 on: April 04, 2014, 09:55:35 AM »
In order to test if port forwarding is working properly you need to have an outside connection try to connect. But if nothing is listening for that connection it will fail no matter what.

So my port tester program opens the port on the computer and then waits for a connection from my site and then accepts it. This way you know for sure port forwarding is working.

It works by calling a php page on my site that then tries to connect to the port on your internet Ip address. The two IP address you see connecting are both from my web host. I didn't even know about the 2nd IP, must be the php socket connect comes from one of their main servers then.

So it is rather simple. Program opens the port on the computer and is listening for a connection. Then it asks my server to send a connection. If it makes it through then you know port forwarding is working. if it fails then you know port forwarding isnt working or something is blocking the connection. :wink:

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Amato

  • PcWinTech Jr. Member
  • Join Date: Apr 2014
  • Posts: 3
  • Karma: 0
Re: How does Port Tester work?
« Reply #2 on: April 04, 2014, 12:35:14 PM »
Thanks Shane!  I was able to get it to work.  I had to enable port forwarding on my router and add a firewall rule.

Two additional questions:
1) Is there a way to add all ports to be tested in the Port # field (ports 1-65535)?
2) Is there a way to export the results to CSV or text file?

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: How does Port Tester work?
« Reply #3 on: April 07, 2014, 10:12:42 AM »
Quote
1) Is there a way to add all ports to be tested in the Port # field (ports 1-65535)?

No since the site will only test one port at a time. I have to do that to keep the server from being over loaded. And it would take a long time to test 65,000+ ports :-)

Quote
2) Is there a way to export the results to CSV or text file?

I never added that option as no one has ever needed it. The program is meant to simply test a few ports to make sure port forwarding is working. It isnt meant to test a huge number of ports and such.

In my Simple Internet Tools Program I have a port listener that has some of those options.

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Amato

  • PcWinTech Jr. Member
  • Join Date: Apr 2014
  • Posts: 3
  • Karma: 0
Re: How does Port Tester work?
« Reply #4 on: April 07, 2014, 01:28:22 PM »
Got it.  Thanks again!

PcWinTech.com Forums

Re: How does Port Tester work?
« Reply #4 on: April 07, 2014, 01:28:22 PM »

 

email