php script problems. please help

Associate
Joined
9 Nov 2004
Posts
1,177
Location
Essex
Hi

I've been playng with a php script that shows if a particular port is open on my home server

One of the ports is to show if my ftp server is online or not. I've got the ftp to listen on a port other than the default 21

Now the php script works like a charm on my home apache set up and shows that the port is open (for this test it's set as 62555)

but if i try it on my external website is shows that the ftp is offline, the port is definately open to the outside world as i tested it with this http://www.g6ftpserver.com/en/ftptest and my mates can access it without any problems

can anyone shed any light as to why it doesn't show as online on the external website? do webhosts normally block scripts from checking random ports like this (tried it with other random ports aswell such as 2121)
i also tried it on another website hosted elsewhere as well as different php scripts and it does the same.

the whole thing works fine on the default port of 21 aswell but don't want to use that port although i have enabled it for the purpose of this thread


Here are the examples to show you what i mean. the first link is to my home server and the second is to my external site hosted with vidahost

http://tempurl.thruhere.net/

http://www.darren-s.co.uk/monitor/

I hope this all makes sense and any help appreciated :)
 
What you're doing is essentially port scanning, and yes web hosting companies will not like you doing that and might have certain counter measures. If it's not breaking your T&C try an nmap on your servers address and see what you get back
 
ok, thats not detecting that port 62555 is open either, although it does say that the port for telnet is open for some reason :S
 
ok, thats not detecting that port 62555 is open either, although it does say that the port for telnet is open for some reason :S

I think nmap just uses a reference list of port number <-> likely services so it's no idea what is on port 62555 but it is says you can access it by telnet (which if it is an ftp service you can). Think that's the case
 
ok, thanks for the help, looks like i'll have to put this on hold for now then

The port looks open to me:

nmap -sT 90.203.34.40 -p 62555
Nmap scan report for 5acb2228.bb.sky.com (90.203.34.40)
Host is up (0.047s latency).
PORT STATE SERVICE
62555/tcp open unknown

Your ISP shouldn't mind you just testing if a single port is open or not. Could you post your PHP testing script here? It should be perfectly possible to check if it's open or not, and it is. I suppose your web host could have firewalled outbound connections to high destination ports though (stopping your script), and only allow standard connections to a whitelist of common services like port 21 or port 80.
 
Last edited:
Back
Top Bottom