Trying to setup my first server, but having problem with public IP reddit / selfhosted ---------------------------------------------------------------------- _meTju_ · 2023-12-21 13:48 Hey, Recently i finished my networks course in uni and i want to make my first server. But there are issues with ISP and their public ip assignment. I will post image of how my problem looks like below. Problem is i tried hosting simple game server on port 25565 on my own pc. I port forwarded everything, but people from outside internet couldnt join me. Then i did some digging and found out that my ISP is not assigning my external router public IP. It looks like they are in their own NAT. What's my ip websites gives me IP: 185.x.x.x . I looks like my external router is in some sort of bigger subnet of other ISP clients. I communicated with ISP and they said that I can rent a public IP for my device. I dont know for what device should i get my public IP tho. Lets say that now i want to host simple game server on my PC, but later on Im planning to make dedicated server for it and other services. I want to be able to reach my server from outside internet. Will public assignment to external router and then port forwarding to devices/server be a good idea or should I assign public IP to my server inside my subnet? This can be costly since, i can change parts of that server and it would require renting again so Im more keen on router assignment. Can you please give me any advice on this and what problems I can encounter further on? Im kinda new in practical network stuff. Thank you. ​ https://preview.redd.it/igt0gf8yjn7c1.png?width=1315&format=png&auto=w ebp&s=a7b3ce7b64c04828e4e92669d00cc4e85de6855e ---------------------------------------------------------------------- dadarkgtprince · 2023-12-21 13:54 Just use ddns instead of a static. Also, did you open the ports on your firewall? ---------------------------------------------------------------------- Editz7 · 2023-12-21 13:57 What ISP do you have? ---------------------------------------------------------------------- Legitimate_Farm_3095 · 2023-12-21 14:05 /r/networkinghelp ---------------------------------------------------------------------- _meTju_ · 2023-12-21 14:10 >Just use ddns instead of a static. Also, did you open the ports on your firewall? Will ddns work if i can't locate my external router? It changes IP everytime it restarts and i can't get it's IP in the ISP subnet. And yea i opened all ports on firewall, i can join to the PC/server from my other clients in my local subnet. Router firewall should also be open to that port. Also I cant get into my external router because it's limited only to ISP access. So every change i wanna make i have to contact them. ---------------------------------------------------------------------- _meTju_ · 2023-12-21 14:12 It's local ISP in my area. If it helps, I can provide you their name. ---------------------------------------------------------------------- Editz7 · 2023-12-21 14:14 I was just wondering cause it could be possible they are sharing your public IP among several other customers. Just a thought. ---------------------------------------------------------------------- ninjersteve · 2023-12-21 14:23 What equipment in the diagram is specific to you vs shared? 185.x.x.x is a public IP. ---------------------------------------------------------------------- RedditSlayer2020 · 2023-12-21 14:26 it's propably CGNAT, you would need an external vps and link your internal network via vpn so that your friends can connect to the vps ip and get routed through the vpn to your game server at home ---------------------------------------------------------------------- _meTju_ · 2023-12-21 14:28 Yeah thats probably it. Thats why they sent me an option to rent a public IP. Idk tho if i should assign that public IP to router or to the server if thats possible. ---------------------------------------------------------------------- _meTju_ · 2023-12-21 14:30 185.x.x.x is public IP that i get from internet. External router is the one i have at my home. From it i have my home subnet. I can't/don't know how to get outside IP of my router tho. I can't get into it's settings. ---------------------------------------------------------------------- Editz7 · 2023-12-21 14:30 Router you will get way more flexibility. ---------------------------------------------------------------------- _meTju_ · 2023-12-21 14:31 Oh thank you. So then i can route specific port traffic to my server right? ---------------------------------------------------------------------- _meTju_ · 2023-12-21 14:32 Wouldn't renting a public IP solve this issue? If they can connect to my network i can then forward their trafic to my server and etc. ---------------------------------------------------------------------- RedditSlayer2020 · 2023-12-21 14:34 Yes ---------------------------------------------------------------------- dadarkgtprince · 2023-12-21 14:37 Local network is different than external. You may need to look into something like cloudflare tunnels instead as that'll create the tunnel going outbound, then others can connect through that tunnel, no port forwarding needed ---------------------------------------------------------------------- Editz7 · 2023-12-21 14:39 Yessir! ---------------------------------------------------------------------- _meTju_ · 2023-12-21 14:47 Thank you so much for the advice! ---------------------------------------------------------------------- arcadianarcadian · 2023-12-21 14:56 It's called CGNAT, as ISPs do these days. I think you have two options. \- Call your ISP and ask for static IP without CGNAT. In my country, I paid extra bucks for my ISP to have a static IP, and then CGNAT disappeared. \- Rent a VPS, install a VPN such as WireGuard, and forward requests to your game server. I run some services just like this. ---------------------------------------------------------------------- _meTju_ · 2023-12-21 15:02 I just exchanged some emails with my ISP. They said that they use CGNAT or share same public IP to more clients. I’m thinking of just paying for own public IP, since it’s way easier and probably it’s cheaper than VPS and VPN setup. Should I get static public IP for my external router and then port forward stuff or should server have its own IP? ---------------------------------------------------------------------- iC0nk3r · 2023-12-21 15:02 All my homies hate CGNAT ---------------------------------------------------------------------- rwilso03 · 2023-12-21 15:12 Bets are he is under a CGNAT. My last house was this way and the IP just isnt publically available. The ISP will need to give you a public IP for this to work. Could go one of two ways: they give a public dynamic ip or a public static ip. DDNS would certainly apply to the first case. No need in the second. Now depends on the ISP. For the price they may charge you for a public IP, you might be better off renting a VPS like Linode for $5/mth and connecting via something like wireguard or tailscale and routing traffic through that connection. That will punch a hole in the NAT for you and give you a public IP too. ---------------------------------------------------------------------- thesarthakjain · 2023-12-21 15:16 If you're not planning to host something for the public to use but rather just for yourself to access over the internet, look at tailscale. It'll allow you to setup a free VPN to connect to your home server over the internet. ---------------------------------------------------------------------- arcadianarcadian · 2023-12-21 15:51 Be sure there will be CGNAT when they give you a public IP. It's up to your infrastructure to give public IP to the router or server, but I would prefer on the router. ---------------------------------------------------------------------- Editz7 · 2023-12-21 18:24 NP! ---------------------------------------------------------------------- justinf210 · 2023-12-22 00:08 Man, that's disappointing. I'm not sure how long it would've taken for me to get into self-hosting if I couldn't just forward a port and be done with it. ---------------------------------------------------------------------- ninjersteve · 2023-12-22 23:52 Most dynamic DNS services allow you to update a name to the IP address that the request is coming from, so they will get your external IP for you. Or have I lost the plot here?