Tutorial Port Forwarding Tutorial - Windows

Discussion in 'Guides and Tutorials' started by Deanthelis, May 22, 2012.

  1. Deanthelis

    Deanthelis Level 4

    Joined:
    Dec 20, 2011
    Messages:
    64
    In this tutorial I will attempt to provide a step - by - step instruction on the process of port forwarding. Port forwarding is necessary to run a Terraria server of any sort without the use of Hamachi, which is gross.

    1. Get your router's default gateway. This is a very simple process. Simply open Command Prompt (Start menu -> Programs/ All Programs -> Accessories -> Command Prompt OR Start Menu - > Run -> cmd)
    and type ipconfig. Press enter. Something like this will show up.
    [​IMG]

    2. Type that gateway into the address bar of your browser. Mine looks like this, but yours may be different.
    [​IMG]

    3. Navigate to your firewall's settings. It will ask you for a password; if you set one, use that one. If you did not set one, look up your router's default password. Typically the default password is empty, Admin, admin, or password. My settings looks like this:
    [​IMG]

    4. For my router, I simply put the number 7777 in both of the Port (or Range) boxes, as the above image shows, then press "Add Definition". I have seen some routers where there is simply a list of allowed ports for certain applications, and you have to define a new application and add the port to that, then add that application to the computer you are on. In any case, it's relatively simple to find. Anyway, I've added a few ports (The numbers really don't matter for Terraria.), and my list looks like this:
    [​IMG]

    5. You're done! Follow https://tshock.co/xf/index.php?threads/basic-tshock-server-set-up-tutorial-windows.1427/ to set up a basic TShock Terraria server. Enjoy!
     
    • Dislike Dislike x 1
  2. Silver.palidin

    Silver.palidin Level 0

    Joined:
    Jun 12, 2012
    Messages:
    2
    There is a much more simple way. Just download Simple port forwarding here. Then find your router by opening the drop down menu then typing in the first two letters of your router. Then type in your username and password for your router. After that go to file then click on "Add port/s". Now a window will pop up click on "Add Custom". Then type in the name that you want, and select TCP as the type. The start and end port have to be 7777. Next hit add. You will have to add an additional port, but with a different name and the type set as UDP. After you have added those ports right click where the ports are listed and select "Update All With Current Local IP". This will change all the ports to the IP that you want. Finally after you have done all of these things, you need to click "Update Router" in the bottom right corner. This will port forward your ports for you. The only thing you will need to do is watch! :D
     
  3. Skryter

    Skryter Level 1

    Joined:
    Jun 1, 2012
    Messages:
    13
    I disagree. do it the way 'deanthelis' explains here, and it takes 3-5 minutes all up.
     
    • Like Like x 1
  4. Silver.palidin

    Silver.palidin Level 0

    Joined:
    Jun 12, 2012
    Messages:
    2
    Well if you don't have a static IP address this is easier and you don't have to find your IP addresses at all.
     
  5. Ijwu

    Ijwu Level 11

    Joined:
    Apr 4, 2012
    Messages:
    647
    Having a static IP has nothing to do with port forwarding, at least pertaining to this guide or the program you pointed out.
     
  6. Deanthelis

    Deanthelis Level 4

    Joined:
    Dec 20, 2011
    Messages:
    64
    You really have no idea what you're talking about, do you?
    I have a dynamic IP.
    I can do the process I entailed above in under three minutes.
    Your IP has little to nothing to do with port forwarding, ports are access points through your network firewall, not a magical password through your IP.
    If you want to post another tutorial for your silly little program, be my guest - Don't distract from the proven method here.
     
    • Like Like x 1
  7. Skryter

    Skryter Level 1

    Joined:
    Jun 1, 2012
    Messages:
    13
    And you only need to this method once, unless you un-port forward.

    EDIT: to open the run cmd box, for windows 7, just hold down the windows symbol button, then press r, and it should open.
     
  8. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    293
    Is there any way of port forwarding without accessing the router? My father thinks opening ports are invitations to hackers and viruses. It's impossible to persuade him :mad:... I have no ways of accessing my router's info
    It's a 1997's router, so I have a feeling it doesn't support UPnP
     
  9. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,596
    No
    You need to port forward through the router. This means you need access to the router.
    However, I'm sure it wouldn't be difficult to find information to sway your father into allowing you to port forward.
    Alternatively, you could use a paid host.
     
  10. CoderCow

    CoderCow Level 6

    Joined:
    Aug 23, 2012
    Messages:
    150
    You don't necessarily require direct access to the router if it supports opening ports through UPnP.
     
  11. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    293
    IF YOU GET 97 ON ALL CLASSES AND 2300 ON SAT! -The father of Bippity T-T
     
  12. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,596
    Owch.
    Good luck
     
    • Like Like x 1
  13. k0rd

    k0rd Tee Shawk Developer
    TShock Admin

    Joined:
    Dec 22, 2011
    Messages:
    438
    If you have access to a unix machine somewhere, you could use an ssh tunnel to do it.
     
  14. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    293
    Sadly I do not. But do you mind posting a tutorial on how to do this or should I just google this? As other users (and maybe some of my friends) might find this setup useful.
     
    • Like Like x 1
  15. Loganizer

    Plugin Developer

    Joined:
    Dec 2, 2012
    Messages:
    212
    I have access to a unix machine, I can help you with that. :)
     
    • Like Like x 1
  16. k0rd

    k0rd Tee Shawk Developer
    TShock Admin

    Joined:
    Dec 22, 2011
    Messages:
    438
    The first step is to obtain a unix shell, have the administrator add
    Code:
    GatewayPorts yes
    to sshd.config

    next, download putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

    with putty, add a new connection with your unix shell, under the ssh>tunnels option, you'll want to do the following:

    1) check the first two checkboxes (local ports accept connections from other hosts and remote hosts do the same)
    2) type 7777 as the source port
    3) type 127.0.0.1:7777 as the destination
    4) click the "remote" radio button
    5) click add

    save the connection, then connect to it, type your password

    now people should be able to connect to your tshock server using the unix hostname as the hostname and 7777 as the port as long as you keep the putty connection open.
     
  17. Loganizer

    Plugin Developer

    Joined:
    Dec 2, 2012
    Messages:
    212
    So he can connect to mine, and do that so he can have his computer have the ports open? Or would that only work so that you must use a linux server to host tshock?
     
  18. k0rd

    k0rd Tee Shawk Developer
    TShock Admin

    Joined:
    Dec 22, 2011
    Messages:
    438
    Those are instructions for having a local windows machine running tshock, connecting to a remote linux server. If he is using linux, the procedure would be a bit different.
     
    • Like Like x 1
  19. Loganizer

    Plugin Developer

    Joined:
    Dec 2, 2012
    Messages:
    212
    Thanks, so to be clear:
    he does the instruction you have above, right? Connecting to my linux server.
     
  20. k0rd

    k0rd Tee Shawk Developer
    TShock Admin

    Joined:
    Dec 22, 2011
    Messages:
    438
    Yep. You will have to add the "GatewayPorts yes" instruction to your sshd.config, and restart sshd.

    The instructions are a bit different if you are already using port 7777 on your linux machine.