View previous topic :: View next topic |
Author |
Message |
nickc n00b
Joined: 22 Jun 2003 Posts: 30 Location: UK
|
Posted: Sat Jun 28, 2003 10:31 am Post subject: All Ports Blocked? |
|
|
Just installed Gentoo recently and every port seems to be blocked by default:
nmap -sX 127.0.0.1
Starting nmap 3.27 ( www.insecure.org/nmap/ ) at 2003-06-28 12:31 GMT
All 1623 scanned ports on localhost (127.0.0.1) are: closed
Nmap run completed -- 1 IP address (1 host up) scanned in 1.701 seconds
Strange thing is, when I run iptables -L it doesn't initilise properly:
iptables -L
modprobe: Can't locate module ip_tables
iptables v1.2.8: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
All I really wan to know is how I can open some common ports like ssh and vnc?
Thanks |
|
Back to top |
|
|
tphamm Tux's lil' helper
Joined: 01 Jun 2003 Posts: 112 Location: Saskatoon, SK, CA
|
Posted: Sat Jun 28, 2003 2:33 pm Post subject: |
|
|
Hi nickc,
You need to have daemons listening on those ports before they will be open. Eg. sshd will open port 22, xinetd will listen on whatever ports it is configured for... You can start these using the scripts in /etc/init.d
netstat -natu will also show you what ports are open on your local computer. _________________ "This is a UNIX system! I know this!" -- little girl from dinasaur park |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Sat Jun 28, 2003 9:04 pm Post subject: |
|
|
the whole thing works somewhat like this:
() there is a convention that every service has a certain port number (like most ip numbers also have a name)
() when u want to connect to another computer u knock at its door and ask for the program foo with the portnumber 99 (or ssh with port 22)
() if the computer u are trying to connect to has the correct daemon running - when someone is at home - the door will open
() if no one is at home u simply get no response - the port is closed
if u want to open a port, all u have to do, is to start a program that listens for someone who is knocking and then answers - thats what tphamm already explained... _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
nickc n00b
Joined: 22 Jun 2003 Posts: 30 Location: UK
|
Posted: Sat Jul 26, 2003 10:32 am Post subject: |
|
|
Thanks for the help. I still have a problem though, I have started a VNC server and verified that the ports are open and it's listening.
When I try to VNC into it I get refused, I've checked the VNC server logs and it tells me that the server is up but nothing about a refused connection. This suggests that somehting (Not the VNC server though) is dropping the connection...
Any ideas what's doing this?
Thanks, Nick |
|
Back to top |
|
|
devon l33t
Joined: 23 Jun 2003 Posts: 943
|
Posted: Sat Jul 26, 2003 6:46 pm Post subject: |
|
|
Does /var/log/secure show anything? Do you have iptables running? |
|
Back to top |
|
|
nickc n00b
Joined: 22 Jun 2003 Posts: 30 Location: UK
|
Posted: Sat Jul 26, 2003 8:16 pm Post subject: |
|
|
devon wrote: | Does /var/log/secure show anything? Do you have iptables running? |
Thanks, I don't have iptbles running and I have no such file on my system... What else could this be? |
|
Back to top |
|
|
|