How To Host


  • Admin

    Disclaimer: Because this Guide heavily depends on the software AND hardware you are using, I won't go into the details.
    Google or any other Search-Engine is your best friend!

    In order to allow requests to reach your computer we need to configure 2 Components:

    Configuring your Local Firewall

    Your Firewall is what blocks unallowed requests from being processed and/or answered from your Computer.
    This is a good thing, but in this case we need to setup a special rule for it in order to allow TripleA to be accessed by other clients over the web.
    On Windows it's often sufficient to just allow a single Application to communicate through the Firewall. You can add TripleA to the "Allowed Applications" in your Control Panel, if you are not using the installer, you need to add java instead.
    On all operating systems you have the possibility to open single ports manually. TripleA uses port 3300 by default.
    DO NOT TURN OFF YOUR FIREWALL FOR A LONGER PERIOD OF TIME UNDER ANY CIRCUMSTANCES

    Finding your Firewall-Settings

    Windows

    Open your Control Panel, change the View By setting to "Small/Large Icons" and click on "Windows Firewall">Allow a program or feature through Windows Firewall

    Linux

    Based on the distribution you are using this will differ. On Debian based systems (including Ubuntu) you can use ufw (uncomplicated firewall) instead of manually messing with iptables. With ufw you just enter sudo ufw allow 3300 in a terminal. Done.
    If you are using Linux you probably know how to figure out how to do this on other distributions. There are just too many to list them all.

    Mac

    I have no idea... (If you are a mac user, please tell me so I can edit this in here later)

    Configuring your Router

    Assuming yor Computer is not connected directly to the internet, but connected to a router instead which is most likely the case, we need to tell your Route it's supposed to route all TripleA-related traffic to your computer.
    This is called "Port-Forwarding". You can find tons of guides for every router model out there in the Internet.
    It would be impossible to list all of those here!
    Make sure your Router forwards Port 3300 to Port 3300 on your local machine.
    If you are asked for the Protocol select TCP.

    Troubleshooting

    Computers often don't work like you want them to, here are some tricks that might come in handy if something is not working for you:
    Try temporarily disabling your Firewall. If everything is working fine with your Firewall disabled, you haven't setup your Firewall correctly. If it's still not working your Router isn't correctly forwarding the traffic to your PC.

    canyouseeme.org is a website that helps you checking if your configuration is working. Just enter the port you want to check (in our case 3300).

    If you still have any questions, feel free to ask!

    added link https://forums.triplea-game.org/assets/uploads/files/1523253787960-upnp.zip

    Replacement of http://tripleadev.1671093.n2.nabble.com/Download-Maps-Links-Hosting-Games-General-Information-tp4074312p4085700.html

  • Admin

    Looks good but you need to describe deeper. Many do not know how to access their router or find their firewall settings.


  • Admin

    I updated my guide. Should be easier now!


  • Admin


  • Admin

    @prastle How to Host a Bot.
    Anyone that can host can host bots.

    Now you will need to place a bot folder or multiple ones, in the same TripleA program folder. The below is an example of one of my bots. Using windows. Other operating systems are slightly different.

    @echo off
    SET PORT=3363
    SET BOT_NUMBER=25

    SET LOBBY_HOST=45.79.144.53
    SET LOBBY_PORT=3304

    java -server -Xmx320m -Djava.awt.headless=true -classpath bin/triplea.jar games.strategy.engine.framework.headlessGameServer.HeadlessGameServer -Ptriplea.game.host.console=false -Ptriplea.game= -Ptriplea.server=true -Ptriplea.port=%PORT% -Ptriplea.lobby.host=%LOBBY_HOST% -Ptriplea.lobby.port=%LOBBY_PORT% -Ptriplea.name=Bot%BOT_NUMBER%_Pras1 -Ptriplea.lobby.game.hostedBy=Bot%BOT_NUMBER%_Pras1 -Ptriplea.lobby.game.supportEmail=prastle7@hotmail.com -Ptriplea.lobby.game.comments="automated_host" -Ptriplea.lobby.game.reconnection=172800

    pause

    Save the above to a notepad file and rename it with the name and number that you wish for your bot. Make sure it is using one of the correct port numbers you have opened on your router. Now resave the notepad file as a .bat file and place it in your Triple program folder. Test to see if your bot launches in the lobby. @RoiEX please have a look at this and see if you agree thanks Pras



  • @roiex i have changed the required parameters in my router for forwarding. however triplea is looking for my computer on 67.193.217.176 whereas i have no control to change the ip address in the router. so i am stuck. i have the posts and help guides but it isnt working. thoughts?


  • Admin

    @lehabitant I'm not sure what exactly is your problem. There's no need to change an IP address at all.
    I'm assuming you're probably not familiar with WANs and LANs so I try to explain it in simple terms: There are about 4 Billion possible IPv4 addresses but far more devices able to access the Internet. So to temporarily (for the long run IPv6 was developed) avoid this problem your Router makes all of your devices at home share the same public IP address.
    Normally this works perfectly fine, but it fails when you actually want another device to access your computer via the Internet.
    So you basically want to tell your router to forward any requests on <your configured port> to your local PC in your Local (Area) Network to <your configured port>.
    I hoped this helped understanding what you're trying to achieve.
    In order to help you any further on this: On which exact step are you having problems with?



  • @roiex i understand what you have posted. i am failing to have my computer recognized on the internet/by triplea. i think i have my forwarding parameters correct but i can seem to get triple a to find me. hence i am unsure of what more i can do. when triple a tries to find me i get an error message that says ....cant find you on 67.193.217.176. in my router the only address i have is 192.168.1.140. i understand i dont need to change IP due the router doing its job. but if i have set everything correctly, where am i going wrong?

    my settings for single port forwarding on a linksys ea6100:
    name external port internal port protocol device IP enabled
    triplea 3300 3300 both 192.168.1.140 true


  • Admin

    @lehabitant Your setup looks good, it's probably just a typo or something minor at some point. Note that every IP starting with 192.168 is a local IP only visible from within your LAN. So TripleA probably correctly detects your public IP, this is unlikely the problem.
    I can recommend canyouseeme.org a tool you can use to check if you setup port forwarding correctly. Just enter the port you want to check and it will tell you if it's able to detect a service at that port. Note that this will only work when your client/ TripleA is already actively hosting (you might need to use a headless client for this to work, not sure if you can just ignore the warning).

    In any case looking at a guide from your router manufacturer there are only 32 possible error sources that would come to my mind. I'm assuming you enabled your rule correctly (just noticing this, because it seems there's a checkbox to enable this rule, but you probably already checked that twice.)
    So the are just 2 things that might be the problem here: Your port could be wrong. It might be the case that triplea is hosting on another port than you configured it to something other than 3300.
    The other potential problem, also described in the guide could be that your ip address is wrong/outdated.
    To make sure your ip is correct, (assuming you use Windows) press the Windows Button + R type in cmd Enter, type in ipconfig Enter.
    Somewhere in this description should be your ip address.
    If it's not that's your issue. You might need to make your local ip static (see guide) for the ip not to change in the future.
    Hope this helps



  • @roiex i have done everything you have suggested including using the canyouseeme. it couldnt see me. i apologize for so many posts but would like to figure this out. i havent made any typos or other errors that i can see. if i have everything correct in my router settings, would it be the windows firewall? i have the exception in it but that could be a possibility...


  • Admin

    @lehabitant

    The firewall diagnosis is fairly simple. What happens when you try the below?

    ( Note, if you have multiple firewalls, confirm their status too. )

    Troubleshooting

    Computers often don't work like you want them to, here are some tricks that might come in handy if something is not working for you:
    Try ***temporarily*** disabling your Firewall. If everything is working fine with your Firewall disabled, you haven't setup your Firewall correctly. If it's still not working your Router isn't correctly forwarding the traffic to your PC.

    Replacement of http://tripleadev.1671093.n2.nabble.com/Download-Maps-Links-Hosting-Games-General-Information-tp4074312p4085700.html


  • @general_zod tried my firewall settings too. regardless of what i do triplea comes back with the same message .....looking for your computer on 67.193.217.176 port 3300... all of my settings appear to be setup correctly. i also turned off my firewall in my router and in windows. no luck. i pretty much give up. i cant think of anything else to try and everything appears correct. no idea where to go next.


  • Admin

    @lehabitant

    Correct me if I'm wrong.

    I am assuming this message is seen somewhere in the router traffic history only.

    The ip that it refers to doesn't look like a local ip address, it looks like a outside ip. (the ip assigned by your internet service provider).

    Is "67.193.217.176" what you have entered in "Device IP" in your routers port forward config? If so confirm this is truly the local ip address of you computer.

    0_1514830370761_sc.linsys_1.JPG

    To make sure your ip is correct, (assuming you use Windows) press the Windows Button + R type in cmd Enter, type in ipconfig /all Enter.
    Somewhere in this description should be your ip address.



  • all is well now. due to some internet malfunctions i ended up removing my linksys router considering my ISP provides me with a wireless router. logged in and made the port changes and looks like everything is fine now. was able to host. thanks for your help and patience. happy gaming.



  • For Mac OS, when you host a game the system will ask you if TripleA can receive incoming requests (authorize it).

    Once you've hosted a game, it will show the IPv6 address. For other computers on the LAN, they'll have to connect with the host's IPv4 address.

    IP websites will report your router's WAN address, not the one you need. To get the host's local IPv4 address, open terminal and enter "ifconfig getifaddr enX" where X = 0 (eth), 1 (wifi), usually.