Jump to content

Utterly and completely defeated by staritng a server.


Rochenfeller

Recommended Posts

I did everything I could possibly read. Every link on my google for "Zomboid server" "zomboid port forward" and "Zomboid hosting" is now purple. I have nothing. I'm beginning to pull my hair out.

I finally got my server running just from my computer just to play with a few friends, and they can't join. no matter what port. No matter what IP I give them. My IPV4 from whatismyip.com doesn't work. The static IP I have set up doesn't work. I manually forwarded Ports 16261-16263, one at a time, two separate rules, UDP and TCP each.

I've given my friend my IP address. he can't join. I gave him my static IP. He can't join. Gave my IPv6 Address. he can't join. Had him try all three on each port. He can't join.

DELETED my firewall. He can't join.

What am I doing wrong? I can finally get on my own server after months of trying, and I can't even bring one single person to my sandbox.

Link to comment
Share on other sites

What operating system is the server on? 

 

With a typical setup with a windows server you have three tiers to check:

a) Verify that your server is up by connecting to localhost (127.0.0.1:16261) This bypasses all firewall/port forwarding settings [it sounds like you have this working]

 

b) Verify that your firewall settings are correct by connecting, from a different computer, to your server's local ip (ex. 192.168.x.x or possibly 10.0.0.0/172.16.0.0)

If you don't have a second computer on your network to check from then you just have to be sure that your firewall rules are correct.

The windows firewall will by default block java.exe (the JVM running the server) from accepting inbound connections and requires an exception.

It usually automatically prompts you the first time an application runs but sometimes you have to manually set this.

You can do this with one rule of Any Port Any Protocol (which will include both TCP/UDP) for the java.exe that your server bat file points to.

 

Example from command line (Windows Vista or higher, won't work with XP):

netsh advfirewall firewall add rule name="PZ Server" dir=in action=allow program="C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\jre64\bin\java.exe" enable=yes

Windows key + R and WF.msc to open the windows firewall settings.

You may have multiple java.exe JVMs on your computer and thus multiple firewall rules for them.

 

c) Verify that your router 'port forwarding' is correct by connecting to your remote IP (that's the IP from whatismyip.com). You can use the same computer as the server for this step.

This is where you might have two separate rules on your router to forward UDP 16261 and TCP 16262-162xx connections to your server (192.168.x.x)

Router software varies on this step and uses annoyingly different terminology.

 

Also, as far as I am aware everything has to be done on IPv4 (though maybe some weird setup with tunneling could cause issues there.)

Link to comment
Share on other sites

c) Verify that your router 'port forwarding' is correct by connecting to your remote IP (that's the IP from whatismyip.com). You can use the same computer as the server for this step.

This is where you might have two separate rules on your router to forward UDP 16261 and TCP 16262-162xx connections to your server (192.168.x.x)

Router software varies on this step and uses annoyingly different terminology.

 

Also, as far as I am aware everything has to be done on IPv4 (though maybe some weird setup with tunneling could cause issues there.)

 

I would just like to put the emphasis on the router part of that. Just fire open a whole heap of ports through a range, rather than it being individual.

Link to comment
Share on other sites

Hey, I'm having a similar issue.

 

Server checks out using the 127.

 

I used port forward utility, so i have a static IP

 

I checked the ports using said utility, it works out fine

 

When I attempt to join using my external IP I'm unable to get a connection.

 

Windows Firewall, i added the rule, to make sure it wouldn't have an issue with java from Zomboid.

I've tried it without the firewall on.

 

The only time the port checker states that 16261 is unavailable is when the server is running ( i have 262,263 open for connections)

 

I'm also at a loss on how to figure this out.

 

I tested the port forward settings with another game called AI.War and a friend could join that without issue.

 

edit: strange he could connect just fine, but i can't connect. I have to use the local IP for myself. So strange.

Link to comment
Share on other sites

Hey, I'm having a similar issue.

 

Server checks out using the 127.

 

I used port forward utility, so i have a static IP

 

I checked the ports using said utility, it works out fine

 

When I attempt to join using my external IP I'm unable to get a connection.

 

Windows Firewall, i added the rule, to make sure it wouldn't have an issue with java from Zomboid.

I've tried it without the firewall on.

 

The only time the port checker states that 16261 is unavailable is when the server is running ( i have 262,263 open for connections)

 

I'm also at a loss on how to figure this out.

 

I tested the port forward settings with another game called AI.War and a friend could join that without issue.

 

edit: strange he could connect just fine, but i can't connect. I have to use the local IP for myself. So strange.

 

Using an external IP to connect to a locally hosted game of PZ has always caused funky business and has generally been unadvised.

Link to comment
Share on other sites

It has to deal with Network Address Translation. When trying to connect to yourself externally it's not going to be successful without a proper NAT. Generally you would just use the 192.168.x.x LAN IP or connect locally within the machine address of 127.0.0.1 .  In order to fully access yourself unrestricted both externally and LAN wise your best bet would be to setup a DMZ to your computer's LAN IP. This isn't a very secure way of doing it, but it will get the job done especially if you want to avoid running port forwards for every little thing.

Link to comment
Share on other sites

  • 1 month later...

When will a more streamlined system to host a server be made? Something like: create server, password - pick world settings - load mods - create character and play. Players who want to join can then pick your server name from the online list and click 'join'. The fiddling with IP's and ports is offputting.

Link to comment
Share on other sites

headzit, it's a complicated problem that every server has to deal with (game related or not.)

UPnP can be used to forward ports programmatically but not all routers have that enabled by default and it has proven to be a security risk.

You can use a middle-man to facilitate NAT traversal/punch-through but even that will sometimes fail depending on how NAT is implemented on each individual router. Steamworks integration could make this option more attractive as I believe Valve hosts servers that can facilitate this.

 

And then you have IPv6. When IPv6 hits mainstream then not only will NAT on IPv4 still be around but then IPv6 will involve stateful firewalls on home routers which will also require configuration (otherwise every device on your network will need its own rock solid firewall.)

Link to comment
Share on other sites

headzit, it's a complicated problem that every server has to deal with (game related or not.)

UPnP can be used to forward ports programmatically but not all routers have that enabled by default and it has proven to be a security risk.

You can use a middle-man to facilitate NAT traversal/punch-through but even that will sometimes fail depending on how NAT is implemented on each individual router. Steamworks integration could make this option more attractive as I believe Valve hosts servers that can facilitate this.

 

And then you have IPv6. When IPv6 hits mainstream then not only will NAT on IPv4 still be around but then IPv6 will involve stateful firewalls on home routers which will also require configuration (otherwise every device on your network will need its own rock solid firewall.)

I hope Steamworks integration comes soon then. Thanks for the explanation. It was just frustrating to spend hours on trying to get a server to work and to fail in the end.

Link to comment
Share on other sites

Ok, I got the server working, but unfortunately I don't know exactly how I fixed it.

 

It could be one of these things:

 

I downloaded Port forward Network Utilities. It could be that this program changed something in my firewall settings.

 

I made a mistake in my port forward router settings. Somebody already opened some ports on my router (one year ago), but the IP was from his computer. So I replaced my IP4 to the port forwarding settings. Real simple solution and totally my fault, but if you miss this, you will search for a long time.

 

So in the end, nothing wrong with this game, only it's kind of harsh for newbies like me ;) Thank you for your effort and response EnigmaGrey.

Link to comment
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
×
×
  • Create New...