So I have a domain (nextcloud.selfhosted.tamashalasi.com) which points to 91.101.56.134
:
The public IP of my router is the mentioned IP, this screenshot is from https://whatismyipaddress.com/
...and this is from the router's page (note that although it is a dynamic IP address, the IP address only changes if the MAC address of the router changes):
I have a server on the network which has the name "debian". It has a permanent IP address of 192.168.0.101
; the ports 80 and 443 get forwarded to this IP.
The server runs on a barebones debian 5.10.0, with nginx installed, running the default
config with server_name nextcloud.selfhosted.tamashalasi.com
added to it.
I also added an extra rule to iptables, which I added to enable accessing port 80.
This is the output of iptables -L
(docker is also installed, but that shouldn't be a problem I suppose):
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:http
Chain FORWARD (policy DROP)
target prot opt source destination
DOCKER-USER all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain DOCKER (3 references)
target prot opt source destination
ACCEPT tcp -- anywhere 172.20.0.2 tcp dpt:http
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target prot opt source destination
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-ISOLATION-STAGE-2 (3 references)
target prot opt source destination
DROP all -- anywhere anywhere
DROP all -- anywhere anywhere
DROP all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-USER (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
With this config, I can access http://nextcloud.selfhosted.tamashalasi.com/ inside my local network, but can't outside it. Accessing the IP directly yields the same results.
I would like to make the IP accessible outside my local network; do you know what might have gone wrong?
Note that I am a total server setup noob. If this post doesn't belong here, I would love if you could point me somewhere where the post does belong so that this issue can be solved. Thank you ❤️
0 Answers