Cannot open a port (80)

I have config for a few days and can't find out what is the problem here.
I have try modify the /etc/rc.conf
flush the firewall rules
and allow packet to enter port 80
still don't work

I test it by:
I go to http://www.canyouseeme.org/ and check if port 80 is open it said connection refused.

I am using FreeBSD 7.2 behind a DIR-605 router
Can you tell me exactly how to open it?

thx
hen
 
You'll need to open and forward the port on your router too.
 
SirDice said:
You'll need to open and forward the port on your router too.

I have handle that on DLink... set the router to forward the port 80 to freebsd internal address port 80
 
"listen to a port" mean that there is service like apache waiting connections on that port. if you don't have any service binding on that port then the port is closed, thus connection refused ;)
 
Code:
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
usrac    firefox-bi 3764  53 tcp4   192.168.0.103:65236   64.233.189.147:80
usrac    firefox-bi 3764  54 tcp4   192.168.0.103:64128   64.233.189.99:80
usrac    firefox-bi 3764  57 tcp4   192.168.0.103:62092   64.233.189.104:80
usrac    firefox-bi 3764  60 tcp4   192.168.0.103:49557   64.233.189.104:80
usrac    firefox-bi 3764  61 tcp4   192.168.0.103:63102   64.233.189.104:80
 
root display
Code:
]USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
usrac    firefox-bi 3764  53 tcp4   192.168.0.103:61333   64.233.189.100:80
usrac    firefox-bi 3764  60 tcp4   192.168.0.103:61176   74.125.11.92:80
 
So nothing is listening on your port 80. That makes it rather hard to connect to it.
 
There's no service listening on port 80. You will need to install www/apache22 or any of the other webservers if you want to serve something on port 80.
 
For testing purposes, run this command on your machine: [cmd=]nc -l 80[/cmd]. This will 'hang', don't panic. From another machine, telnet to your machine's port 80, and type 'hello'. You should see 'hello' on both sides. At least you'll know that the connection is possible. Close the telnet session with [cmd=]^][/cmd] and [cmd=]Ctl-d[/cmd]. That will also close the nc listener.
 
ubuntu@ubuntu-desktop:~$ telnet 192.168.0.103 80
Trying 192.168.0.103...
telnet: Unable to connect to remote host: Connection refused
 
What do you actually expect to find on your own port 80? You must have a reason to try to connect to it. Simply 'opening port 80' will not perform a magic trick and create a website ..
 
You can't "open a port" until you install a program to listen on that port. IOW, unless you install Apache and write a webpage, you won't have anything to connect to.
 
hernysun said:
ubuntu@ubuntu-desktop:~$ telnet 192.168.0.103 80
Trying 192.168.0.103...
telnet: Unable to connect to remote host: Connection refused

Was this when [cmd=]nc -l 80[/cmd] was running on 192.168.0.103?
 
DutchDaemon said:
What do you actually expect to find on your own port 80? You must have a reason to try to connect to it. Simply 'opening port 80' will not perform a magic trick and create a website ..

I am try to open a web server with apache, but the server won't go online, so i reinstall freebsd and try to open port 80 right now
 
phoenix said:
You can't "open a port" until you install a program to listen on that port. IOW, unless you install Apache and write a webpage, you won't have anything to connect to.

I have install apache before and i could link to it with localhost
but not from someone outside
 
just installed apache
and i run sockstat -4p 80
got this:

Code:
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
www      httpd      11369 3  tcp4 6 *:80                  *:*
www      httpd      11368 3  tcp4 6 *:80                  *:*
www      httpd      11367 3  tcp4 6 *:80                  *:*
www      httpd      11366 3  tcp4 6 *:80                  *:*
www      httpd      11365 3  tcp4 6 *:80                  *:*
root     httpd      11364 3  tcp4 6 *:80                  *:*
 
Back
Top