Should connecting to my.public.real.ip/24 from another device on a different network connect me to my PIs hosted web page if I have installed apache+gave it static ip+port-forwarded? Is using DNS mandatory? If not what am I missing?

I have been trying to set up my Raspberry Pi as a simple server for about a day now. I followed this tutorial.

My understanding of how servers work is very limited. I get to the step where I set up my static IP (but take it from another tutorial) which seems to be working since every time it boots it picks (which is what I picked). And I think I do the portforwading correct.

While I am fairly certain it is a static IP by default by my ISP is it an issue if it isn't? I will be the only one using it since I will use it for home automation. For the last month it has not changed and issues like it changing from week to week won't affect me that much.

ifconfig output

eth0      Link encap:Ethernet  HWaddr b8:27:eb:bc:37:7e  
      inet6 addr: fe80::bda7:f79d:d4e1:54c5/64 Scope:Link
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
      inet addr:  Mask:
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:404 errors:0 dropped:0 overruns:0 frame:0
      TX packets:404 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1 
      RX bytes:37749 (36.8 KiB)  TX bytes:37749 (36.8 KiB)

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:e9:62:2b  
      inet addr:  Bcast:  Mask:
      inet6 addr: fe80::d690:abfc:41c2:7d96/64 Scope:Link
      RX packets:10086 errors:0 dropped:0 overruns:0 frame:0
      TX packets:6520 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:9450949 (9.0 MiB)  TX bytes:880856 (860.2 KiB)

the end of dhcpcd.conf:

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname

interface wlan0
       static ip_address=
       static routers=
       static domain_name_servers=

Note: I get the same result if I use port 80 but I am trying to avoid it because I am not sure if the ISP blocks it.

I have TP-LINK TL-WDR3600

For some reason I have issues uploading pictures from the raspberry so here is how I forwarded it:

connected to

There is some GUI and a menu 'Forwarding'

It has under menus as

  • Virtual servers
  • Port Triggering
  • DMZ
  • UPnP

It seems Virtual servers is the option I need since it is the only one that allows me to set the IP address of the PC running the service application.

Virtual service has the following inputs:

Service Port:24
Internal Port:24
IP Address:
Protocol: All (options are TCP and UDP)
  • Judging from what you wrote, you cleanly has several misunderstanding on how IP/network works. 1) You probably don't understand the meaning of /24, it is not refer to port, it defined your network subnet. Read this. 2) your public IP seldom change doesn't mean you have a fixed IP, unless you paid a premium for fixed IP and for commercial (vs residential) subscription. 3) Your ISP won't block port 80 as it is the default and most common internet access port, if your ISP block port 80, your browser/router won't work without specific configuration.
    – hcheung
    Commented Sep 6, 2017 at 14:33

1 Answer 1


For some reason just when I wrote the question I found there is one more step: Change the apache listening port too.

This is what I did:


I am not sure why it was not working on port 80. Maybe my ISP is actually blocking it.

  • 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
    Commented Jan 19, 2020 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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