Search Unity

How to play with friends over internet?

Discussion in 'FPS.Sample Game' started by rizwanbabar693, Feb 25, 2019.

  1. rizwanbabar693

    rizwanbabar693

    Joined:
    Jul 15, 2016
    Posts:
    17
    Hey, how can we play it with friends over internet? Do i need to put public ip of the person who is hosting server? And do i need to forward a port for it?
     
    thongtm3d likes this.
  2. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Howdy,

    You would need a public IP for the server, or need to use a VPN software to make a virtual private network.

    Depending on your firewall settings, I am sure you would need to forward or allow ports in/out for the server.

    Clients should be able to connect to public IPs from private IPs.

    Really, this is a standard server/client setup.

    Cheers
    Micah
     
  3. rizwanbabar693

    rizwanbabar693

    Joined:
    Jul 15, 2016
    Posts:
    17
    I have port forwarded my router with port 7913 but my friend is still unable to connect through my ip public ip. And im not sure if my router is really forwarding the port. I have turned off firewall on both PCs
     
  4. Ankaman

    Ankaman

    Joined:
    Feb 14, 2014
    Posts:
    37
    There is a public server running on address 213.202.228.247
     
    Last edited: Mar 4, 2019
  5. rizwanbabar693

    rizwanbabar693

    Joined:
    Jul 15, 2016
    Posts:
    17
  6. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Hello Riz, I was doing some stress testing (great results 30+ clients, <1Mbps) and ran into issues with connectivity. Using windows 10, there is an additional check which would block you from hosting a server within this picture. If you disable this "Block all incoming connections, including those in the list of allowed apps" - it should allow you to host a serve and keep your windows firewall on.

    You will need to open up ports 7913 and 7923 for in and outbound traffic from your firewalls and routers, any NATing you would do, would need to be for these default ports.

    You can also change these ports, to fit your firewall rules... with these added keys to your executable :
    +server.port
    +server.sqp_port

    Example with the PORT changed to 444 and the SQP to 445:
    AutoBuild.exe +server.port 444 +server.sqp_port 445 +serve test01 -batchmode -nographics +server.maxclients 100

    GL HF
     

    Attached Files:

    Last edited: Mar 16, 2019
    thongtm3d likes this.
  7. Ankaman

    Ankaman

    Joined:
    Feb 14, 2014
    Posts:
    37
    You also can just build the dedicated linux server and run it as a server only
     
  8. angus_unity820

    angus_unity820

    Joined:
    May 4, 2019
    Posts:
    4
    Are there suggested good alternate ports? Or should 7913 work reasonably well from a Windows host?
    I've setup forwarding and adjusted the firewall and am having some difficulty figuring out what else I should be doing to host.
    I'm having some trouble getting this going and was hoping to avoid deploying to a cloud Linux server when testing with friends.
     
  9. angus_unity820

    angus_unity820

    Joined:
    May 4, 2019
    Posts:
    4
    Alright, as an update I deployed to AWS and ran the server there, I setup a security group opening ports 7913 and 7923 for TCP and UDP, I've opened the same ports to my machine for TCP and UDP. Is there something else I need to do to get this going over an internet connection?
     
  10. angus_unity820

    angus_unity820

    Joined:
    May 4, 2019
    Posts:
    4
    Might also be worth noting that I can't see the public server at 213.202.228.247
    Is it still up and running? Would that be an indication that I'm having an error on my local machine?
     
  11. angus_unity820

    angus_unity820

    Joined:
    May 4, 2019
    Posts:
    4
    And of course, now that I've given up it works :)
    Must've taken time for the security group to update, or disabling the DMZ on my router did it? Not sure.
    But I can at least now connect, though I am getting an error, but I can hopefully sort through the error on my own another day.
     
    Journeythedev likes this.
  12. Qwerty77955

    Qwerty77955

    Joined:
    Apr 26, 2017
    Posts:
    1
    i cant connect to my frends or they cant connect to me i tryed to port forword but it still wont work