Solved

port-forwarding

Posted on 2006-06-23
3
294 Views
Last Modified: 2010-08-05
Hi,
I have a cable modem and a wireless router. We have 4 laptop clients connected. We all use http, which is port 80. I use a direct connect program that uses TCP port 612. I forwarded 612 to my computer using the router's NAT. Why do I need to forward that port to me? Why don't we forward port 80? I know we all use 80, so is that why? The packets get sent everywhere? What if someone else wanted to us that DC program on port 612?

To me, port-forwarding seems like a paradox. I understand why you'd use it: to forward w/e packets are coming through that port to your computer. I know I can only forward a port to one computer, so I don't get why 80 isn't forwarded -- well, more than 1 computer obviosuly.

Does anyone understand what I'm getting at?
0
Comment
Question by:bostonfenix275
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
rich255 earned 50 total points
ID: 16972294
port 80 is more accurately called a "service port".  When you connect to the web using port 80, you are actually connecting to port 80 on the webserver.  The port on your PC will be a high-random port over 1024.  You can view this with the "netstat -a" command while you are connected to a web page.  The web connection is an outbound connection.  The router performs NAT, which basically means it changes the source IP and port of the connection and keeps track of every connection going through the router.  When it has info to send to your PC, it knows where to send it.

Port forwarding is for inbound connections.  Is your program a server or a peer to peer program?  Your program requires the use of port 612...  port forwarding will tell the router that when it gets inbound packets on port 612 that they should be sent to your PC's port 612.
0
 

Author Comment

by:bostonfenix275
ID: 16972355
Wow, I'm an idiot...duh.

I didn't even think of that -- inbound vs. outbound. I am running an SSH server on my laptop w/ port 22 forwarded to my machine. That means when someone tries to connect to http://OUR.EXTERNAL.IP:22 it will go to my comp....duh.

So say we had 2 machines running web servers...we could do 1 machine on 80, another on 8080, which would mean the URLS:
http://OUR.EXTERNAL.IP ...OR...http://OUR.EXTERNAL.IP:80
AND
http://OUR.EXTERNAL.IP:8080

Thanks for the help, I feel officially stupid :)
0
 
LVL 3

Expert Comment

by:rich255
ID: 16972393
Don't kick yourself too hard.  It may be simple, but the problem is there are TONS of simple things to keep track of!

Your're right about the multiple web servers.  Internally you can have them all using port 80, but the outside will need to do forwarding on multiple ports:

extIP:80  ->  PC1:80
extIP:8080 -> PC2:80
extIP:5000 -> PC3:80
and so on...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Internet for 45 users 5 239
Model ES-601WS 5 169
Does Surface Pro 2 have a max broadband speed 18 141
Guest Wireless in a Business Environment 6 94
    Over the past few years, small business and home owners have become so dependent on internet that a need for redundancy has arisen.    What happens when your small business or home / home office loses its internet connection?  The results c…
Cable Modem Provisioning from DPoE compliant server  This Article is to support CMTS administrators to provide an overview of DOCSIS compliance configuration file, and to provision a cable modem located at customer place from a Back office serve…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question