PDA

View Full Version : /Is it possible to port forward to my laptop to test if a port is open




infobleep
Aug 10, 2013, 02:04 PM
Hi there

I'm hoping this is the right forum to post in. I am trying to test whether my router is correctly allowing me access to port 25. Is their a way of forwarding port 25 to my Mac laptop and using it for something in order to test it.

What I'm actually trying to do is set up a mail server on my Synology Diskstation but I figured I might get somewhere if I first tested whether port 25 works on another device. If it does then the problem is with my diskstation.

I'm also have problems with port 5019 but many other ports I've set up in the same port forwarding rule to my diskstation are fine.

I'm running OS X 10.8.4 mountain lion on a Macbook air. My internet provider is plusnet and the router is a Thompson TG582n. I do have 2 other routers but I've not been able to get them to connect to plusnet, despite not be locked down.



chown33
Aug 10, 2013, 04:40 PM
Netcat should be able to listen. man nc or:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/nc.1.html

It'll need to run as root to listen on port 25. man sudo

I can't help with setting up port-forwarding on your router. Find the user manual for it; port-forwarding instructions should be in there. Or google the mfgr and model of your router with the added keywords port forward.

infobleep
Aug 10, 2013, 04:55 PM
Netcat should be able to listen. man nc or:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/nc.1.html

It'll need to run as root to listen on port 25. man sudo

I can't help with setting up port-forwarding on your router. Find the user manual for it; port-forwarding instructions should be in there. Or google the mfgr and model of your router with the added keywords port forward.

Thanks for your reply. Not come across nc. Will test with it.

I've set up the port forwarding. It's actually similar to my last router, which is locked down to O2, so I can't test against that router.

infobleep
Aug 11, 2013, 09:19 AM
Hi there

This may no longer be the right place to continue this thread so just let me know if it is.

I ran netcat and was able establish a connection between my two macs.
listener:
sudo nc -l 25
Mac connecting to it:
sudo nc 192.168.1.81

That established a connection so port 25 worked internally. Next I tried this with my diskstation server and one of my macs.
Listener [my server]:
nc -vv -l -p 25
Mac connecting to it:
sudo nc 192.168.1.71
That established a connection so I tried it using the static ip address supplied by my ISP:
Listener [my server]:
nc -vv -l -p 25
Mac connecting to it:
sudo nc *.*.*.* [address obscured here]
It also connected. As soon as I took out my port forwarding rule, the connection was not made. This suggests that the port was indeed open and the port forwarding rule working correctly.

However that doesn't explain why www.canyouseeme.org cannot access port 25 when I run the test in Chrome. May be the problem is with my diskstation.

Bizarrely www.canyouseeme.org can now see port 25 but it's not able to see port 80; 5001 and no doubt all the other ports it could see when it couldn't see port 25 and port 5019. Note all this is contained in the same port forwarding rule. That confuses the matter even more. Is my router at fault? Perhaps I've got somewhere, yet nowhere at the same time.

As an aside. In order to get netcat working on my diskstation I had to install it using IPKG command. If anyone needs instructions I can forward them on as it's outside the scope of this thread. Needless to say it wasn't without it's problems as I obviously not used IPKG since I last upgraded my diskstation DSM operating system.

chown33
Aug 11, 2013, 02:50 PM
Bizarrely www.canyouseeme.org can now see port 25 but it's not able to see port 80; 5001 and no doubt all the other ports it could see when it couldn't see port 25 and port 5019. Note all this is contained in the same port forwarding rule. That confuses the matter even more. Is my router at fault? Perhaps I've got somewhere, yet nowhere at the same time.

Some ISPs will block incoming connections on port 80 or port 25 for accounts that aren't configured for server status. "Configured for server status" basically means paying the ISP to unblock the port.

I had port 80 blocked like that by an earlier ISP. I simply setup my HTTP server on a different port that wasn't blocked. I no longer use that ISP, but I haven't bothered testing if my current ISP blocks port 80 or anything else, since the issue is resolved for me.

FWIW, port 25 blocking is put in place by ISPs to help avoid spam-bot networks. I'm not saying it's necessarily effective, just that it's a rationale.

infobleep
Aug 11, 2013, 03:15 PM
I have a business line and my ISP do not block 25. They have even done a line test to confirm this.

I have since reset my router and set up port forwarding to just port 25. I have also restarted my diskstation.

I have now disabled the firewall on my router can gone to www.canyouseeme.org. That cannot see any port I've entered, despite seeing some of them earlier when I had port forwarding rules set up.

I have switched off the firewall on my router. If the firewall is disabled, surely every port should be visible if my ISP is not blocking any of them.