Hi there,

I am pretty new to Linux, so apologies for any stupidly obvious answers I might miss; I have a Raspberry Pi with some self hosted stuff to use in my LAN - however I have recently decided to host a Gogs (git) server on there also (as well as a Wordpress server).

Heres the issue - my Plex server is accessible from WAN, the Wordpress server is half working and the Gogs server is only accessible from LAN.

Basically if I connect to the server with LAN IP it works, if I use WAN IP it doesnt (The server at IP is taking too long to respond). One weird thing I noticed is that the Wordpress server - if I try to go to that via WAN IP it doesn’t work, but if I go via the DNS it works fine.

The Gogs server is using Docker, Wordpress just uses nginx. I have a static IP and have forwarded the correct ports on my router, I also have a new modem for fibre that I have not used before - not sure if that matters.

I’m mostly focused on getting the Gogs server accessible from WAN, I’m not too fussed about Wordpress right now since that works via DNS anyway.

Really appreciate any possible solutions you guys might know

  • @abominable_panda
    link
    English
    311 months ago

    Does your nginx config know how to handle a direct IP address request? Seems like its set up for domain name only?

    • @WesleeOP
      link
      English
      2
      edit-2
      11 months ago

      To be honest I think the wordpress install handled all that, or maybe wordpress handles it inheritly, I’m not sure. I simply pointed a domain to my static ip and forwarded http/https to the correct LAN ports and it just worked on its’ own.

      I probably shouldn’t have mentioned Wordpress, I’m mostly focused on the Gogs server right now, I just added it for more context on the issue

      • @abominable_panda
        link
        English
        2
        edit-2
        11 months ago

        Oh yeah my mistake. Ill give it some thought but in the meantime you might find more help in the selfhosted community

        • @WesleeOP
          link
          English
          1
          edit-2
          11 months ago

          Thank you, I will try there, I was trying to install PiVPN since I can connect to the Gogs server on my local network, if I could just get a VPN server running it should work, but of course more issues with that. The cause could well be some config I might have changed and forgotten about, reimaging and starting fresh might be the easiest solution.

          Though, I did just upgrade to FTTP - which added a modem or some kind of device between my router and the internet, so maybe there could be some extra config surrounding that I’m just not aware of

          • @abominable_panda
            link
            English
            211 months ago

            Generally if youre selfhosting a vpn is better from a cyber security perspective anyway.

            • haui
              link
              fedilink
              2
              edit-2
              11 months ago

              This. I was getting fits when I read the post. Fiber is actually great for selfhosting a service but the security side is very dangerous for uninformed individuals.

              If configuring an nginx server is already stretching it, its only a matter of time until your stuff is encrypted and ransomed. Same goes for all data in your network. If the pi is not in its own zone, it has now become a door to your network with barely a lock, let alone a good one.

              I would highly recommend reading up on network security and probably prioritize isolating the pi and making at least daily backups.

              You router is going to be scanned for open ports every couple minutes. If the wordpress doesnt have a strong password, you‘re in for a bad time.

          • @abominable_panda
            link
            English
            111 months ago

            Looking at the config have you set up the domain name and everything for WAN?