Jump to content

Is it possible to host a server at home and have other's connect with my public IP?

I'm not that great with networks, but here's my theory. I want to try a Minecraft server that friends can connect to. I've done this in the past with Minecraft and GMOD, but I used Hamachi in both cases. We would just all connect to the same Hamachi network and they'd be able to connect to my server thru my local IP address. Now I'm thinking, if I get my network's public IP, would others be able to connect to my server using my IP and a port? And would I need to do a port forward or not? This is just a test server and I a have a hosting service picked for anything serious, but I want to try this. Would it work and if not, what would I need to do?

Thanks for helping.

Link to comment
Share on other sites

Link to post
Share on other sites

It is possible, look into Dynamic DNS (with a service like No IP) to essentially use a domain name instead of an IP which makes things easier for your friends.  

 

Link to comment
Share on other sites

Link to post
Share on other sites

Forward port 25565 to the internal IP address of the Minecraft server and it should just work.

Main Linux rig: HP Elitebook 2560P (i5-2410M, 8 GB, Pop! OS)

Living room/couch gaming rig: AMD 5800X, Asus TUF Radeon 6900 XT, 32 GB, 65" LG C1 OLED

Home server and internet gateway: Dell Optiplex 3040 MFF (i5-6500T, 16 GB, Ubuntu Server 22.04 LTS)

Phone: Asus Zenfone 10

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, Giganizer300PRO said:

if I get my network's public IP, would others be able to connect to my server using my IP and a port?

yes - that should work. use something like dyndns to make it easier, as @SirMonti already said.

 

11 minutes ago, Giganizer300PRO said:

And would I need to do a port forward or not?

yes - if your routers firewall is worth anything then you need to open a port or two for the server to be accessible from the outside. 

 

i don't recommend it tho. it might be fine for testing with a friends but be very carefull who you share that ip or dyndns url with. it is very risky to expose the IP of your home internet connection. 

 

i heard from people who got ddosed the crap out of after their ip became known to the public. (like when the IP was accidently shown on screen during a twitch stream or so)

 

professional hosters usually implemented a high level of protection against this kind of shit that a regular consumer internet connection does not have. 

 

Link to comment
Share on other sites

Link to post
Share on other sites

You can do that and you will have to do some port forwarding. You'll also need to set up a static address on your private network and exempt it from the DHCP pool. Using some sort of domain name would make things easier for your friends if your public IP isn't static. You will have to be wary though. Opening ports is like leaving your car unlocked in a thieving town. Make sure the computer you point the router to has some form of security that prevents alternate connections from being made. It could result in a hacker or bot taking over the machine and having access to your private network. Things such as vlans and subnetting can help mitigate this.

 

EDIT: I suppose I should mention that what I said isn't entirely accurate. VLANs & Subnets won't prevent the machine itself from being taken over but it will prevent the machine from being able to read traffic that is traversing your network from other machines.

 

Unfortunately chances are you don't have a managed switch and managed router. Both would be required to use VLANs to the fullest of its functionality. You'd need to set up the VLAN's on the switch which could be as simple as dedicating one physical port to the server but then on the router you'd need to configure sub-interfaces so the traffic from each VLAN isn't recombined at the router which would defeat the purpose.

 

Subnetting IS something you can do as it's simply a IP Mask modification in software. This would place the server on a network separate from the home network but still allow both networks access to the internet from the same gateway. This would prevent direct access to other network devices.

 

You'll also what to change the password on the router (which I can MOST home users do not) if the server ever got taken over the first thing the hacker or bot may do is attempt to open more ports so they have more means of access or tamper with other settings such as disabling the routers firewall. Or just shutdown your network and lock you out of everything.

 

Usually a cheaper solution is to use a dedicated firewall device which could be plugged into the server. This could monitor the traffic and deny access to any connection that isn't in the exception list. I don't have much experience with firewall devices so I cannot help you there but it's worth mentioning.

Link to comment
Share on other sites

Link to post
Share on other sites

I've done this in the past and manually hosted my own files/site but depending on your ISP connection speeds it may not be worth the trouble. :S

- ASUS X99 Deluxe - i7 5820k - Nvidia GTX 1080ti SLi - 4x4GB EVGA SSC 2800mhz DDR4 - Samsung SM951 500 - 2x Samsung 850 EVO 512 -

- EK Supremacy EVO CPU Block - EK FC 1080 GPU Blocks - EK XRES 100 DDC - EK Coolstream XE 360 - EK Coolstream XE 240 -

Link to comment
Share on other sites

Link to post
Share on other sites

I do not know why people say it is possible without knowing your isp.

 

You have to determine if you are behind a global carrier nat.

If so connecting to the server is not possible.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×