How to tell if a port is open or closed?

For discussions about security.
Post Reply
Message
Author
User avatar
Smithy
Posts: 1151
Joined: Mon 12 Dec 2011, 11:17

How to tell if a port is open or closed?

#1 Post by Smithy »

Is there some way to open up (or close) ports in Puppy Linux 431?

I can't really see what's going on except for the blinky connection meter,
but I wanted to check that port 2074 to 2076 is being opened for a prog I am using.
Not too sure how the linux firewall works but it is certainly letting firefox and email through, maybe it is already letting 2074 to 2076 through and I have a connection problem elsewhere..

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#2 Post by puppy_apprentice »

try this:
http://ubuntublog.org/linux-firewall-ports-iptables.htm

here u can check your security (but only for window i think):
http://www.grc.com/intro.htm

User avatar
Smithy
Posts: 1151
Joined: Mon 12 Dec 2011, 11:17

#3 Post by Smithy »

Thanks for that link puppy apprentice, I will try it in the console.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

Not too sure how the linux firewall works but it is certainly letting firefox and email through, maybe it is already letting 2074 to 2076 through and I have a connection problem elsewhere..
If you want to open certain ports in the firewall, you need to do a custom install. That's one of the options you will see in the firewall setup.

User avatar
Smithy
Posts: 1151
Joined: Mon 12 Dec 2011, 11:17

#5 Post by Smithy »

Ok, those commands don't work in the console, bash error or something...


But, I went to the custom Linux firewall:
is this the correct syntax "2074-2076/udp" in the specify your ports bit?
It did a sanity check and no errors were generated.

Unfortunately I cannot do an echoserver test because it is a very old program and will have to wait until the recipient connects on the other end.
And Shields Up only does the first 1056 ports.

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#6 Post by puppy_apprentice »

for GRC u can test specified ports, put eg. 2074-2076 in the field under "You may select any service from among those listed above . . ." label

as rcrsn51 wrote u can give acces to specified ports in puppy firewall program, click on firewall try icon and choose custom install, next go to last position in the list and tick it (other), choose your own port eg. 2074/udp or 2074/tcp or 2074 for both, in the next screen specify ip addres that could connect via choosen port

in the console u can check if that port is openned:
iptables -L
or iptables -L | grep 2074

from commandline try this (commands from former pages don't work):
iptables -A INPUT -p tcp --dport 2074 -j ACCEPT
iptables -A INPUT -p tcp --dport 2076 -j ACCEPT
iptables -L or iptables -L | grep 2074 etc.

more info:
https://help.ubuntu.com/community/IptablesHowTo
http://www.linuxhomenetworking.com/wiki ... g_iptables

run your app and check if it listen on your ports:
netstat -nap | grep 2074
netstat -nap | grep 2076

or try this ports on GRC

i didn't check this, i use on puppy only browser and mail apps and my own scripts to parse web pages so i don't know if it will be working ;(

to reset firewall settings click on firewall icon and choose automagic installation

User avatar
Smithy
Posts: 1151
Joined: Mon 12 Dec 2011, 11:17

#7 Post by Smithy »

Thanks for those commands puppy apprentice, the ports are now working properly.
Cheers.

Post Reply