janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Port:80

Fri Sep 21, 2018 12:43 pm

Hi to all,would like to know how to open port80 on Raspberry 3B. Thank you :oops:

User avatar
B.Goode
Posts: 7870
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Port:80

Fri Sep 21, 2018 12:46 pm

Simply run a script or other application that specifies Port 80 as its network interface.

Most web servers will do this by default.

danjperron
Posts: 3334
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Port:80

Fri Sep 21, 2018 12:50 pm

The port 80 is normally dedicated to http server.

Then install apache,nginx or any web server

sudo apt-get install nginx
or
sudo apt-get install apache2


Now if you use another computer and do http://raspberrypi.local, A web page from your raspberry pi will open.


B.T.W. Windows computer won't find http://raspberrypi.local . They will find only http://x.x.x.x which is the IP of your raspberry PI. YOu could use the IPV6 also. It is possible to install the AlloBonjour function into a windows PC.

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 1:20 pm

Thank you for your replay,Raspberry have ssh so it should work but for some reason i can not log in to my program from web browser.My ip scenner show address is 192.168.1.2 when i try to log in no connection.We try on different way,downloaded and install raspberry desktop and from that 0.0.0.0:80 i can log in but not from 192.168.1.2 For some reason port 80 not open.Try to run raspbian light .

User avatar
B.Goode
Posts: 7870
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Port:80

Fri Sep 21, 2018 1:24 pm

The ssh protocol does not, by default, use TCP port 80. This test is inconclusive.


Maybe there is a configuration option for your server that limits the range of source IP addresses that can connect?

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 1:41 pm

Thank you again,my server should be Raspberry by it self,running Raspbian light,and installed reef-pi.My second Raspberry 3B+ running the same program without any problem.Now i try to install as you said different server. Unfortunately i can not upload pics here in this forum from my computer,would be easier to to see the hole picture.

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 1:44 pm

Forget to tell,my computer is linux,am running ubuntu 18.4 so i try to log from here to 192.168.1.2 That is my Raspberry address but my IP scanner show 192.168.1.2 but port is not open.Angry ip scanner

User avatar
B.Goode
Posts: 7870
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Port:80

Fri Sep 21, 2018 1:46 pm

I suggest you ask the reef-pi support community for advice about configuration.

Maybe here: https://github.com/reef-pi/reef-pi/issues

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 2:15 pm

Thank you am in that forum they are very helpful but from some strange reason Raspberry or Raspbian wont open port 80.Thank you for your help,i hope i do not do any problem if i install sudo apt-get install apache2.Thank you

Ernst
Posts: 1141
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Port:80

Fri Sep 21, 2018 2:21 pm

I see to many unknowns in this conversation:

1) What version of Raspbian is installed on the problematic raspberry pi 3b ?
2) How is the problematic raspberry pi 3b connected to the network ?
3) How is your computer connected to the network ?
4) How is the working raspberry pi connected to the network ?
5) What is the IP-address of the working raspberry pi
6) Do you use fixed IP-addresses or DHCP assigned IP-addresses ?
7) If DHCP, which network component hosts the DHCP server
8) Do you have a keyboard and a monitor connected to the problematic raspberry pi 3b ?
9) (trick question) are you using the raspberry pi 3b in gadget mode ?
10) Have you tried to swap memory cards from the working Pi to the problematic Pi ? What was the result ?
11) Have you rebooted your switch / router ?
12) Are you using the onboard WiFi ? or are you using a USB dongle ?
13) Have you looked at your DHCP which address has been assigned ?
14) If wired, have you tried another cable
15) If on WiFi: is client separation disabled ?
16) ...
The road to insanity is paved with static ip addresses

Ernst
Posts: 1141
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Port:80

Fri Sep 21, 2018 2:24 pm

janos1 wrote:
Fri Sep 21, 2018 2:15 pm
Thank you am in that forum they are very helpful but from some strange reason Raspberry or Raspbian wont open port 80.Thank you for your help,i hope i do not do any problem if i install sudo apt-get install apache2.Thank you
FYI: Raspbian will NEVER open a port. A port is a door into the system giving access to a service. A port becomes "open" when a service opens a port for reading. If a port is closed it means that either you have the wrong address or the service is not running.
The road to insanity is paved with static ip addresses

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 3:25 pm

Thank you Ernst for your help,i try to give all the info what i could,BUT am not computer genius age is a factor :oops: (64)but i try to answer to all point.
1.Raspbian GNU/Linux 9 (stretch)
2 try to connect WIFI
3 My comp is connected wired (cat5)
4 WIFI
5 192.168.1.3
6 DHCP assigned IP-addresses
7 Raspberry by it self
8 yes
9 sorry i do not know what is gadget mode
10 did not try because first pi is 3B+ and i run from usb stick.second pi is only 3B not+
11yes i reboted the router but all hell got loose,first RPI stop working for seconds and then restarted but with different IP address but i could fix that.
12 try to use on-board wifi
13 yes on my router 192.168.1.2 and ip scanner 192.168.1.2 and ifconfig on raspberry is 192.168.1.2
14 not wired
15 If on WiFi: is client separation disabled? sorry i have no clue what is that.(my wife knows what is that) :D

Ernst
Posts: 1141
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Port:80

Fri Sep 21, 2018 3:36 pm

janos1 wrote:
Fri Sep 21, 2018 3:25 pm
7) If DHCP, which network component hosts the DHCP server
7 Raspberry by it self
Please check that there is only one active DHCP server on your network and that there are no duplicate IP-addresses.
Normally the router hosts the dhcp server, running a DHCP server on a raspberry can cause problems like duplicate IP-addresses if the same range is being used.
The road to insanity is paved with static ip addresses

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 4:36 pm

Sorry my #7 was wrong?i think my router is the DHCP server.But no duplicate ip address .Not on IP scanner and not on the router

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 4:43 pm

Attached Devices

Go to Access Control to allow or block devices.
Access Control: Turned On
General Rule: Allow all new devices to connect Refresh
Wired Devices
# Status IP Address MAC Address Device Name
1 Allowed 192.168.1.5 14:C9:13:5A:FA:86 LGwebOSTV
2 Allowed 192.168.1.6 F4:4D:30:65:C2:B1 antonia
3 Allowed 192.168.1.7 00:1F:C6:9C:04:77 janos-desktop

2.4GHz Wireless Devices (Wireless intruders also show up here)
SSID Status IP Address MAC Address Device Name
NETGEAR51 Allowed 192.168.1.2 B8:27:EB:BF:8C:7C raspberrypi3
Allowed 192.168.1.3 B8:27:EB:92:07:3B raspberry
Allowed 192.168.1.8 30:CD:A7:16:3F:77 SEC30CDA7163F77
Allowed 192.168.1.9 B4:F7:A1:B1:78:D8 android-18ed3fa12415b811
Allowed 192.168.1.10 58:A2:B5:7C:3F:A0 android-d0368a587f61a044
Allowed 192.168.1.12 F8:DA:DF:00:BE:6F --

5GHz-1 Wireless Devices (Wireless intruders also show up here)
SSID Status IP Address MAC Address Device Name

5GHz-2 Wireless Devices (Wireless intruders also show up here)
SSID Status IP Address MAC Address Device Name
NETGEAR51-5G-2 Allowed 192.168.1.4 AC:83:F3:04:88:34 android-60af99a16916927c

Ernst
Posts: 1141
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Port:80

Fri Sep 21, 2018 4:55 pm

Your DHCP status shows that the raspberry has been provided with an IP-address.
What I suggest is that you use raspi-config to enable the SSH service (port 22) on raspberry3
and then try to access raspberry3 using ssh from your PC and from raspberry.
If this works then you have to look for the problem in the software installed on raspberry3
The road to insanity is paved with static ip addresses

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 5:04 pm

Thank you i go try that

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 5:26 pm

Hi i installed ssh from raspi-config, but did not gain anything,i can now log to Raspberry from my computer with Putty but whe i go to website and type 192.168.1.2 than i got error msg This site can’t be reached
192.168.1.2 refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

Ernst
Posts: 1141
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Port:80

Fri Sep 21, 2018 5:41 pm

janos1 wrote:
Fri Sep 21, 2018 5:26 pm
Hi i installed ssh from raspi-config, but did not gain anything,i can now log to Raspberry from my computer with Putty but whe i go to website and type 192.168.1.2 than i got error msg This site can’t be reached
192.168.1.2 refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Congratulations: this test is proof that there is a problem with your web server because ssh works and that means that the raspberry can be contacted using tcp/ip. It also means that your web server is either not started, or not configured correctly, because port 80 does not accept connections using http.
The road to insanity is paved with static ip addresses

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 5:59 pm

Thank you Ernst i like to ask one more thing,i know :oops: web server is my router or my browser or the program what i try to run?

Ernst
Posts: 1141
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Port:80

Fri Sep 21, 2018 6:09 pm

janos1 wrote:
Fri Sep 21, 2018 5:59 pm
Thank you Ernst i like to ask one more thing,i know :oops: web server is my router or my browser or the program what i try to run?
The webserver is the application that runs on your Pi and waits for a connection on port 80.
see https://www.raspberrypi.org/forums/post ... #pr1368320
The road to insanity is paved with static ip addresses

janos1
Posts: 26
Joined: Thu May 10, 2018 7:14 pm

Re: Port:80

Fri Sep 21, 2018 6:14 pm

Thank you for your help,patient,now i go to learn a little more.Thank you

Return to “Beginners”