Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Pempti · Jun 13, 2014 at 02:24 PM · serverclientinternetovercannot

Client cannot connect to my local server over internet

I've scoured the internet for a solution to this problem to no avail. My code works within my own network - I am able to host a server and have two clients connect to the server with no problem. However, when I attempt to connect to the server from the internet, it just doesn't work.

I googled my public ip address and checked it with several other sites. I've made sure to enter this ip address properly on the client and then I try to connect on port 25005. My server is, of course, also listening on port 25005 but does not see any available connections.

I tried using Unity's Network.TestConnection code in the docs and the test result is: Limited NAT punchthrough capabilities...

Just to clarify, I have the useNat parameter set when I initialise the server.

I then thought, maybe the connection request is reaching my router through the public ip address, but it's not reaching my computer. So I set up port forwarding so that the inbound port 25005 gets forwarded to my machine's private ip address on port 25005. This has also yielded no results. To verify this, I started my server and used canyouseeme.org to test if my port is open and I get the result: Error: I could not see your service on my public ip address here on port (25005) Reason: Connection timed out

Some sites have told me that I need a static ip address for reliable server hosting but right now I can't seem to even be able to establish a one-time connection. I really have no idea what's going wrong and any help would be much appreciated.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Landern · Jun 13, 2014 at 02:28 PM 0
Share

Have you checked for firewall's on both your router(from isp's they can come enabled on your router) and on your machine that has the server setup? You will of course need the port forwarding, but you already did that.

avatar image Pempti · Jun 13, 2014 at 03:19 PM 0
Share

I just went to my router's firewall settings and enabled D$$anonymous$$Z for my machine's ip address. I also turned off my computer's firewall. Unity's Network.TestConnection now reports:

Directly connectable public ip address. NAT punchthrough not needed.

However, open port checking sites such as canyouseee.org still report the same error. Oddly enough, Network.HavePublicAddress() returns false despite Network.TestConnection reporting that I have a directly connectable public ip address.

avatar image Pempti · Jun 14, 2014 at 11:47 AM 0
Share

Okay so despite open port checking sites NOT being able to see my server, external clients CAN connect to my server when I have enabled D$$anonymous$$Z on my machine. However, I've read that this presents a potential vulnerability and would like to know if there are any further workarounds?

Since a connection IS possible, I infer that something in my router must be blocking a necessary port for a connection to be established. I am most certainly listening on port 25005 in my server code...so I'm going to take a guess that my router isn't actually listening on port 25005, which kinda makes sense. Is there any way I can find out what port my router is listening in on to direct stuff from the internet to my machine?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

RPC Error function not found 2 Answers

Server Client internet connection 0 Answers

What's an acceptable network send rate? 1 Answer

Unity UDP freezes if disconnected from server 2 Answers

RPC to a single client 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges