Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

NodeBB

  1. Home
  2. Selfhosted
  3. [SOLVED] ELI5: How to put several servers on one external IP?

[SOLVED] ELI5: How to put several servers on one external IP?

Scheduled Pinned Locked Moved Selfhosted
selfhosted
96 Posts 36 Posters 1 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A [email protected]

    There's an issue with that first part. Do I configure it right? Should <domain>:8100 be redirected to 192.168.0.113:81 in this case?

    I This user is from outside of this forum
    I This user is from outside of this forum
    [email protected]
    wrote last edited by
    #17

    External 80 to internal 80 and external 443 to internal 443

    With this config you don't have to deal with ports later, as http is 80, https is 443 by default.

    If you run some container on port 81, you have to deal with that in the reverse proxy, not in the router. E.g. redirect something.domian.tld to 192.168.0.103:81

    If you use docker check out nginxproxymanager, it has a very beginner friendly admin webui. You shouldn't forward the admin ui's port, you need to access it only from your lan.

    A 1 Reply Last reply
    8
    • A [email protected]

      There's an issue with that first part. Do I configure it right? Should <domain>:8100 be redirected to 192.168.0.113:81 in this case?

      osaerisxero@kbin.melroy.orgO This user is from outside of this forum
      osaerisxero@kbin.melroy.orgO This user is from outside of this forum
      [email protected]
      wrote last edited by
      #18

      This only guarantees your WANip:8100 will map to 192.168.0.113:81, and doesn't address whether or not dns resolution is correct. I would also be weary of using port numbers on wikipedia's known ports list, as some ISPs will filter those upstream. The last thing is that your router may not want to hairpin that traffic, so if you're not coming in from the outside it might not be a valid test.

      A 1 Reply Last reply
      0
      • jacksquat@what.forfi.winJ [email protected]

        Honestly Cloudflare Tunnels could be a very simple way to do it. I've always had tremendous luck with it. By using CF you can let them do all the heavy lifting instead of hosting your own... as long as you trust them.

        rikudou@lemmings.worldR This user is from outside of this forum
        rikudou@lemmings.worldR This user is from outside of this forum
        [email protected]
        wrote last edited by [email protected]
        #19

        You can use frp to do the same thing a CloudFlare tunnel does without giving them your unencrypted data.

        https://github.com/fatedier/frp

        A 1 Reply Last reply
        3
        • I [email protected]

          External 80 to internal 80 and external 443 to internal 443

          With this config you don't have to deal with ports later, as http is 80, https is 443 by default.

          If you run some container on port 81, you have to deal with that in the reverse proxy, not in the router. E.g. redirect something.domian.tld to 192.168.0.103:81

          If you use docker check out nginxproxymanager, it has a very beginner friendly admin webui. You shouldn't forward the admin ui's port, you need to access it only from your lan.

          A This user is from outside of this forum
          A This user is from outside of this forum
          [email protected]
          wrote last edited by [email protected]
          #20

          Actually, I do - 81 is exactly the default port for nginx proxy manager. I just tried to expose it as a testing example, and already closed it back after a success (apparently port forwarding worked just fine, it's just that DMZ messed with it)

          And since we're talking about this, what do I do with it next? I have it on my Pi, how do I ensure traffic is distributed through it as a reverse proxy? Do I need to expose ports 80 and 443 and then it would work automagically all by itself?

          I 1 Reply Last reply
          2
          • jacksquat@what.forfi.winJ [email protected]

            Honestly Cloudflare Tunnels could be a very simple way to do it. I've always had tremendous luck with it. By using CF you can let them do all the heavy lifting instead of hosting your own... as long as you trust them.

            A This user is from outside of this forum
            A This user is from outside of this forum
            [email protected]
            wrote last edited by [email protected]
            #21

            While not supportive of Big Tech, I do appreciate your piece of advice, and understand self-hosting needs differ!

            P.S. Also beware, seems like there's a new attack through Tunnels:

            https://www.csoonline.com/article/4009636/phishing-campaign-abuses-cloudflare-tunnels-to-sneak-malware-past-firewalls.html

            jacksquat@what.forfi.winJ A 2 Replies Last reply
            2
            • osaerisxero@kbin.melroy.orgO [email protected]

              This only guarantees your WANip:8100 will map to 192.168.0.113:81, and doesn't address whether or not dns resolution is correct. I would also be weary of using port numbers on wikipedia's known ports list, as some ISPs will filter those upstream. The last thing is that your router may not want to hairpin that traffic, so if you're not coming in from the outside it might not be a valid test.

              A This user is from outside of this forum
              A This user is from outside of this forum
              [email protected]
              wrote last edited by
              #22

              Thanks for the pieces of advice! Yes, I tried to connect from external (mobile) network as well.

              1 Reply Last reply
              1
              • A [email protected]

                While not supportive of Big Tech, I do appreciate your piece of advice, and understand self-hosting needs differ!

                P.S. Also beware, seems like there's a new attack through Tunnels:

                https://www.csoonline.com/article/4009636/phishing-campaign-abuses-cloudflare-tunnels-to-sneak-malware-past-firewalls.html

                jacksquat@what.forfi.winJ This user is from outside of this forum
                jacksquat@what.forfi.winJ This user is from outside of this forum
                [email protected]
                wrote last edited by
                #23

                Thanks for the heads up!

                1 Reply Last reply
                2
                • A [email protected]

                  I'm pretty new to selfhosting and homelabs, and I would appreciate a simple-worded explanation here. Details are always welcome!

                  So, I have a home network with a dynamic external IP address. I already have my Synology NAS exposed to the Internet with DDNS - this was done using the interface, so didn't require much technical knowledge.

                  Now, I would like to add another server (currently testing with Raspberry Pi) in the same LAN that would also be externally reachable, either through a subdomain (preferable), or through specific ports. How do I go about it?

                  P.S. Apparently, what I've tried on the router does work, it's just that my NAS was sitting in the DMZ. Now it works!

                  T This user is from outside of this forum
                  T This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #24

                  Who is externally reaching these servers?
                  Joe public? Or just you and people you trust?

                  If it's Joe public, I wouldn't have the entry point on my home network (I might VPS tunnel, or just VPS host it).

                  If it's just me and people I trust, I would use VPN for access, as opposed to exposing all these services publicly

                  A J 2 Replies Last reply
                  7
                  • T [email protected]

                    Who is externally reaching these servers?
                    Joe public? Or just you and people you trust?

                    If it's Joe public, I wouldn't have the entry point on my home network (I might VPS tunnel, or just VPS host it).

                    If it's just me and people I trust, I would use VPN for access, as opposed to exposing all these services publicly

                    A This user is from outside of this forum
                    A This user is from outside of this forum
                    [email protected]
                    wrote last edited by
                    #25

                    Just me and the people I trust, but there are certain inconveniences around using VPN for access.

                    First, I live in the jurisdiction that is heavily restrictive, so VPN is commonly in use to bypass censorship

                    Second, I sometimes access my data from computers I trust but can't install VPN clients on

                    Third, I share my NAS resources with my family, and getting my mom to use a VPN every time she syncs her photos is near impossible

                    So, fully recognizing the risks, I feel like I have to expose a lot of my services.

                    S 1 Reply Last reply
                    4
                    • A [email protected]

                      Actually, I do - 81 is exactly the default port for nginx proxy manager. I just tried to expose it as a testing example, and already closed it back after a success (apparently port forwarding worked just fine, it's just that DMZ messed with it)

                      And since we're talking about this, what do I do with it next? I have it on my Pi, how do I ensure traffic is distributed through it as a reverse proxy? Do I need to expose ports 80 and 443 and then it would work automagically all by itself?

                      I This user is from outside of this forum
                      I This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #26

                      You type the ip of the rpi on the router, so from an external call the router will forward it to the rpi. Or I don't know what is your question.

                      Things may seem automagical in the networking scene, but you can config anything the way you want. Even in nginxproxymanager you can edit the underlying actual nginx configs with their full power. The automagic is just the default setting.

                      A 1 Reply Last reply
                      1
                      • A [email protected]

                        I'm pretty new to selfhosting and homelabs, and I would appreciate a simple-worded explanation here. Details are always welcome!

                        So, I have a home network with a dynamic external IP address. I already have my Synology NAS exposed to the Internet with DDNS - this was done using the interface, so didn't require much technical knowledge.

                        Now, I would like to add another server (currently testing with Raspberry Pi) in the same LAN that would also be externally reachable, either through a subdomain (preferable), or through specific ports. How do I go about it?

                        P.S. Apparently, what I've tried on the router does work, it's just that my NAS was sitting in the DMZ. Now it works!

                        C This user is from outside of this forum
                        C This user is from outside of this forum
                        [email protected]
                        wrote last edited by
                        #27

                        If you go with IPv6, all your devices/servers have their own IP. These IPs are valid in your LAN as well a externally.

                        But it's still important to use a reverse proxy (e.g. for TLS).

                        A 1 Reply Last reply
                        3
                        • T [email protected]

                          Who is externally reaching these servers?
                          Joe public? Or just you and people you trust?

                          If it's Joe public, I wouldn't have the entry point on my home network (I might VPS tunnel, or just VPS host it).

                          If it's just me and people I trust, I would use VPN for access, as opposed to exposing all these services publicly

                          J This user is from outside of this forum
                          J This user is from outside of this forum
                          [email protected]
                          wrote last edited by
                          #28

                          Your stuff is more likely to get scanned sitting in a VPS with no firewall than behind a firewall on a home network

                          T possiblylinux127@lemmy.zipP 2 Replies Last reply
                          1
                          • A [email protected]

                            I'm pretty new to selfhosting and homelabs, and I would appreciate a simple-worded explanation here. Details are always welcome!

                            So, I have a home network with a dynamic external IP address. I already have my Synology NAS exposed to the Internet with DDNS - this was done using the interface, so didn't require much technical knowledge.

                            Now, I would like to add another server (currently testing with Raspberry Pi) in the same LAN that would also be externally reachable, either through a subdomain (preferable), or through specific ports. How do I go about it?

                            P.S. Apparently, what I've tried on the router does work, it's just that my NAS was sitting in the DMZ. Now it works!

                            N This user is from outside of this forum
                            N This user is from outside of this forum
                            [email protected]
                            wrote last edited by [email protected]
                            #29

                            VPN is definitely the way to go for home networks. Your router even has one built in. OpenVPN and Wireguard are good.

                            If you really want to expose stuff like this the proper way is to isolate your home network from your internet exposed network using a VLAN. Then use a reverse proxy, like caddy and place everything behind it.

                            Another benefit of a reverse proxy is you don't need to setup https certs on everything just the proxy.

                            You do need a business or prosumer router for this though. Something like Firewalla or setting up a OpenWRT or OPNsense.

                            Synology also has there quick connect service as well. While not great if you keep UPNP off and ensure your firewall and login rate limiting is turned on it may be better then just directly exposing stuff. But its had its fair share of problems so yeah.

                            Consider not self hosting everything. For example if all your family cares about is private photo storage, consider using a open source E2EE encrypted service for photos on the cloud like Ente Photos. Then you can use VPN for the rest. https://www.privacyguides.org/ has some recommendations for privacy friendly stuff.

                            Also consider the fallout that would happen if you are hacked. If all your photos and other things get leaked because your setup was not secure was it really any better than using big tech?

                            If nothing else please tell me you are using properly setup https certs from Let's Encrypt or another good CA. Using a firewall and have login rate limiting setup on everything that is exposed. You can also test your SSL setup using something like https://www.ssllabs.com/ssltest/

                            A 1 Reply Last reply
                            10
                            • brobot9000@lemmy.worldB [email protected]

                              They are a plague with how prevalent they have become.

                              The internet shouldn’t put all its eggs into one basket.

                              It’s just another centralized entity which will lead to monopolized power. It goes against what we are trying to do with federated networks like Lemmy and mastodon.

                              F This user is from outside of this forum
                              F This user is from outside of this forum
                              [email protected]
                              wrote last edited by
                              #30

                              What's a better alternative that offer good ddos protection and tunnels

                              1 Reply Last reply
                              1
                              • A [email protected]

                                I'm pretty new to selfhosting and homelabs, and I would appreciate a simple-worded explanation here. Details are always welcome!

                                So, I have a home network with a dynamic external IP address. I already have my Synology NAS exposed to the Internet with DDNS - this was done using the interface, so didn't require much technical knowledge.

                                Now, I would like to add another server (currently testing with Raspberry Pi) in the same LAN that would also be externally reachable, either through a subdomain (preferable), or through specific ports. How do I go about it?

                                P.S. Apparently, what I've tried on the router does work, it's just that my NAS was sitting in the DMZ. Now it works!

                                bruhduh@lemmy.worldB This user is from outside of this forum
                                bruhduh@lemmy.worldB This user is from outside of this forum
                                [email protected]
                                wrote last edited by
                                #31

                                NAT translation, i use my openwrt router for that

                                possiblylinux127@lemmy.zipP 1 Reply Last reply
                                1
                                • A [email protected]

                                  I'm pretty new to selfhosting and homelabs, and I would appreciate a simple-worded explanation here. Details are always welcome!

                                  So, I have a home network with a dynamic external IP address. I already have my Synology NAS exposed to the Internet with DDNS - this was done using the interface, so didn't require much technical knowledge.

                                  Now, I would like to add another server (currently testing with Raspberry Pi) in the same LAN that would also be externally reachable, either through a subdomain (preferable), or through specific ports. How do I go about it?

                                  P.S. Apparently, what I've tried on the router does work, it's just that my NAS was sitting in the DMZ. Now it works!

                                  W This user is from outside of this forum
                                  W This user is from outside of this forum
                                  [email protected]
                                  wrote last edited by
                                  #32

                                  Whispers “try proxmox”

                                  A 1 Reply Last reply
                                  9
                                  • A [email protected]

                                    Just me and the people I trust, but there are certain inconveniences around using VPN for access.

                                    First, I live in the jurisdiction that is heavily restrictive, so VPN is commonly in use to bypass censorship

                                    Second, I sometimes access my data from computers I trust but can't install VPN clients on

                                    Third, I share my NAS resources with my family, and getting my mom to use a VPN every time she syncs her photos is near impossible

                                    So, fully recognizing the risks, I feel like I have to expose a lot of my services.

                                    S This user is from outside of this forum
                                    S This user is from outside of this forum
                                    [email protected]
                                    wrote last edited by
                                    #33

                                    Remember that with services facing public internet it's not about if you get hacked but when you get hacked. It's personal photos on someone elses hands then.

                                    T A 2 Replies Last reply
                                    1
                                    • A [email protected]

                                      I'm pretty new to selfhosting and homelabs, and I would appreciate a simple-worded explanation here. Details are always welcome!

                                      So, I have a home network with a dynamic external IP address. I already have my Synology NAS exposed to the Internet with DDNS - this was done using the interface, so didn't require much technical knowledge.

                                      Now, I would like to add another server (currently testing with Raspberry Pi) in the same LAN that would also be externally reachable, either through a subdomain (preferable), or through specific ports. How do I go about it?

                                      P.S. Apparently, what I've tried on the router does work, it's just that my NAS was sitting in the DMZ. Now it works!

                                      F This user is from outside of this forum
                                      F This user is from outside of this forum
                                      [email protected]
                                      wrote last edited by
                                      #34

                                      Welcome to the wonderful world of reverse proxies!

                                      1 Reply Last reply
                                      33
                                      • S [email protected]

                                        Remember that with services facing public internet it's not about if you get hacked but when you get hacked. It's personal photos on someone elses hands then.

                                        T This user is from outside of this forum
                                        T This user is from outside of this forum
                                        [email protected]
                                        wrote last edited by
                                        #35

                                        Not sure why you're downvote, you're absolutely right. People scan for open ports all day long and will eventually find your shit and try to break in. In my work environment, I see thousands of login attempts daily on brand new accounts, just because something discovered they exist and want to check it out.

                                        S 1 Reply Last reply
                                        1
                                        • I [email protected]

                                          You type the ip of the rpi on the router, so from an external call the router will forward it to the rpi. Or I don't know what is your question.

                                          Things may seem automagical in the networking scene, but you can config anything the way you want. Even in nginxproxymanager you can edit the underlying actual nginx configs with their full power. The automagic is just the default setting.

                                          A This user is from outside of this forum
                                          A This user is from outside of this forum
                                          [email protected]
                                          wrote last edited by
                                          #36

                                          Where do I type rpi's IP, just in port forwarding? Or somewhere else?

                                          I want for Nginx proxy, controlled through the Manager, to direct traffic to different physical servers based on subdomain.

                                          I put in nas.my.domain and I get my Synology on its DSM port. I put in pi.my.domain and I get a service on my Pi.

                                          I 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups