1

So I've been working on this problem for days now. I have the needed ports forwarded plus more opened just in case, I've tried changing ports.conf to listen to a different port for testing and still no results. I do see some people who have been through similar problems but none of the solutions have helped. Since I've never had problem port forwarding before I assume its not my router or ISP. If I try netstat -tulpn | grep ":80" I get this.

Results from netstat -tulpn | grep ":80"

These are the ports open on my network, As you can see I have more open then needed just because I have been trying many things out to get this to work. And the port 22 is for my SSH which does work outside my network. But this web-server doesn't. 192.168.0.156 is the address to my pi which is connected to the network through WLAN. It's static and doesn't change. Ports open

These are the firewall settings, I don't see much here so I assume its not the problem? Could, of course, be wrong.
Firewall info

This is an nmap scan I did to try and show if port 80 is open nmap info

This is the ports file located in /etc/apache2/ports.conf I did hear that some ISP's block port 80 so I have changed this to a different port before with the 000-default.conf file too. enter image description here

000-default.conf file enter image description here

  • 2
    looks like your server is only listening on ipv6 - so port forwarding ipv4 won't help – Jaromanda X Jan 15 at 7:25
  • Please don't post pictures of text. Instead paste the text direct into the question. – Ingo Jan 15 at 12:11
  • Does port forwarding only work for IPv4 addresses? So I have to make my server also listen to IPv4? – Mnai Jan 15 at 12:23
0

After doing some research I have found that my ISP blocks traffic from port 80. So port forwarding won't do much. What I am able to do is change the site to be hosted on port 8443. But since the default port that http is connected to is 80 that means I have to do www.websitename.com:8443 every time to access it. Once my internet providers give me access to switching the (port block) off, on port 80 (which I think they will be adding it soon) then I should be fine with the apache default setting. But since I already changed my configuration to host it on 8443 I am thinking I can just redirect traffic to go from 80 to 8443 via port forwarding. But I will have to wait until I can unblock 80. This is what I've followed THIS to get the site hosted on 8443 but I did have to change some things because of the apache2 version I am using. Here are the changes I had to make.

apache2/ports.conf

Listen 8080

<IfModule ssl_module>
        Listen 8443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 8443
</IfModule>

apache2/sites-available/000-default.conf

<VirtualHost *:8443>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

apache2/sites-available/default-ssl.conf

<IfModule mod_ssl.c>
    <VirtualHost _default_*:8443>
            ServerAdmin webmaster@localhost

            DocumentRoot /var/www/html

apache2/apache.conf

This goes at the bottom of the file

ServerName raspberrypi
| improve this answer | |
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Feb 16 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.