Announcement

Collapse
No announcement yet.

What is port forwarding?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What is port forwarding?

    Recently I installed an online game and I couldn't connect. My IT buddy back on campus stopped in and told me the game requires "port forwarding". He is not aware how to go about it in Linux. He tried to explain the concept that each computer has an IP address like your house but all houses have doors and windows (access ports) some to most are locked. I am told this procedure unlocks a port and it is relatively safe...

    Now here is part 2 of the same question. After he left I dug into the internet search engines and found plenty of IT gobblety-gook on the issue. But it raised yet another question. Since I have a router, do I need to port forward the router or the PC or both? According to the info I need a forwarded UDP Port 6777 is default but can use 7777-7797 as well.



    oops! almost forgot to mention this; A Linux guide stated in order to run the UDP port I would need; a SSH client such as PuTTY with SSH access and libstdc++ 6
    Last edited by Simon; Apr 28, 2014, 02:39 AM. Reason: oops

    #2
    Port forwarding is something you do on your router. You need to know the port numbers to open and whether TCP or UDP, and you may have to fix the address your computer uses on your subnet, so the router knows where to send the incoming connections (some routers can do it by MAC address IIRC).
    To set up the router, you might try pointing your browser at 192.168.1.1, or 10.0.0.1

    Regards, John Little
    [Edit]
    Just had a squiz at my router, which says it's an "EchoLife HG556a", reached on http://192.168.1.1/, and it calls the place to go "Applications", and it's preconfigured with a list of 68 games, and a bunch of messaging, remote and server apps. If the game wasn't on the list, I'd have to go to Router->NAT, and enter the port number and destination IP, and Router->LAN to set up a reserved IP for my computer's MAC address. You can find that by running ifconfig in a konsole, where it's called "HWaddr".
    Last edited by jlittle; Apr 28, 2014, 03:43 AM.
    Regards, John Little

    Comment


      #3
      My cable modem is assigned a IP address by my ISP which is visible on the public side (WAN) of the Internet, currently 76.84.51.48
      That address is not static, because I have not purchased a static address from my ISP. IF I reboot TW's cable modem it may dispense a different front side address, but I haven't rebooted it in months. The last time I did I got the same address back. My previous IPS, Windstream, ALWAYS assigned a different WAN IP address when I rebooted their DSL modem.

      The IANA has assigned three IP networks (LAN) for private networking: 10.0.0.0/8, 172.16.0.0/16, and 192.168.0.0/16. These IP networks may be used by anyone provided that the network is not connected to the globally connected Internet. If an internet router receives a packet from or to one of these three networks, the router will discard the packet. The "*/8" designation means that only the first of the four numbers is fixed. "*/16" means only the first two of the four numbers are fixed. Wireless routers most commonly default to 192.168.0.0/16 private addresses. At work we used 10.*/8 because it gave us the ability to create more internal IP addresses and to assign numbers to division and department designations, leaving the last number to designate the workstation computer. All static.

      Here is the "Port Forwarding" page shown by my DD-WRT firmware's HTML output
      Click image for larger version

Name:	port_forwarding.jpg
Views:	1
Size:	75.3 KB
ID:	640751

      I have my Cisco E25000 wireless router set to limit the number of wireless IP addresses to five, in the range of 192.168.1.00 to 192.168.1.104. I also have it set to dispense the 192.168.1.111 Local Area Network "static" address to MY laptop based on my laptop's wireless chip MAC address. It is outside the range I set to normally dispense when a guest logs onto my wireless router to eliminate the possibility they could be given the *.111 address.

      A local 192.*.*.* IP address is not directly accessible from the Internet. So, from their homes my grandsons cannot use 192.168.1.111:25565 to connect their Minecraft client in multi-user mode to the Minecraft server running on this laptop. They must use 76.84.51.48:25565 in the connection dialog. IF they happen to bring their laptops with them when they visit their grandmother and I they can use the 192.168.1.11:25565 setting to connect because they are on the LAN side of the wireless router.

      Some applications require only one TCP port address to make a connection. Minecraft is one of those. Other applications, like Jitsi, require both TCP and UDP ports and more than one port address.

      Port Masquerading is more often called NAT, or Network Address Translation. If there is just one public address it is more accurately called PAT (Port Address Translation, only ports are translated). But both are usually named NAT. Way back before wireless routers I used to set up my desktop computer as a "router" connected to the cable modem so my wife and son could connect their computers to our Internet connection at the same time I was using it. I connected a cheap NetGear four port hub to a second NIC in my desktop and gave it a different, static IP address, and used ipchains (this was before iptables) with -j MASQ in the routing rules to set up masquerading between them. The only down side was that they could not connect to the Internet if my desktop was turned off, so I had to leave it on.

      EDIT:
      P.S. -- Don't bother trying to log into my minecraft server. First, you won't know when it is on. Second, I white listed it so your name won't be in that list and you don't know my password even if you use my handle.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        Simple port forwarding for a game is usually no more than logging into your router, finding the port forwarding page, then typing in the IP or hostname of your pc and the port address(s) required. Some "nicer" router firmwares have a guide on where to enter and what.

        Please Read Me

        Comment


          #5
          ok thanks guys I will marked this Solved.

          This is what I did, followed the link that took me to a NetGear Genie login... looking at the router base I found the password (very funny) I don't think I have to worry about changing it. Went to Advance tab, then Advance again (Whoa! Advanced Advance stuff like infinity times infinity) found it there. In port forwarding they had some presets for elite games, but I am always working with old crap never mentioned on some pop Letterman list. ok So I took the address 192.168.1.4 which is common for the 4th item on a local network and fed it 6777 as the port. Saved and exited.

          It worked and my feeble game can now access the internet and find all those others (like me) who still play these old PvP games. Most can't speak the Queen's English but we don't talk much. lol

          Comment


            #6
            There is a quick and dirty guide for port forwarding for many popular games and routers here.

            cheers,
            bill
            sigpic
            A person who never made a mistake never tried anything new. --Albert Einstein

            Comment

            Working...
            X