Project to test router's specific port if open or not

Hi all. Any suggestion on test the router's specific port if open or not. TCP port? UDP port? Thanks.

chubbychico:
Hi all.
Any suggestion on test the router’s specific port if open or not.
TCP port? UDP port?
Thanks.

Well, TCP and UDP ports are different as are ICMP ports. While it is common convention that things that listen on both TCP or UDP register the same port in the globally known ports, it is not required. So, either you need to test all protocols above the IP layer, or you need to know which type of port to check.

If you are just wanting to test the external ports on your router, you might want to look at shields-up, which is a net service that upon request probes the ports of your router. Obviously if you have somebody logging such attempts, it may trigger alarms, etc. GRC | ShieldsUP! — Internet Vulnerability Profiling  

If you are programming an Arduino to do the test, I would imagine the networking forum might be an appropriate place to ask. You probably should mention your setup, what type of network connection you have (ethernet shield, wifi shield, gsm shield to name 3 types), whether your Arduino sits behind the router or is in a different network external to your router, and what is the point of the exercise. If it is a school exercise, you should expect to have to learn how to do the network programming yourself, and not just take a canned solution somebody else wrote.