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 192.168.0.111/24 (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.
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:127.0.0.1 Mask:255.0.0.0 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:192.168.0.111 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::d690:abfc:41c2:7d96/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 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=192.168.0.111/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1
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 192.168.0.1
There is some GUI and a menu 'Forwarding'
It has under menus as
- Virtual servers
- Port Triggering
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: 192.168.0.111 Protocol: All (options are TCP and UDP) Status:Enabled