LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Redirecting all traffic through another port. (https://www.linuxquestions.org/questions/linux-networking-3/redirecting-all-traffic-through-another-port-926407/)

hemite 01-29-2012 10:24 PM

Redirecting all traffic through another port.
 
I have a basic understanding of how internet ports work, but obviously not enough to help me solve this problem.

Basically I'm located at a university, and the only ports available to me are ports that are open to me, as far as I know, are 25 (SMTP) and 1029. Also I assume 8000 - 8999 or how else would I be writing this post?

This is causing a problem whenever I try to host anything, I clearly can't make any port that i want open.

Would someone please explain to me (preferably as if I was incompetent) how internet ports work. Why can I not route all traffic manually from my computer to whatever port I want. Why can't I just host everything out of port 8000. Why do I have to deal with the router whenever I want to "port forward".

rodrifra 01-30-2012 01:57 AM

If I'm not wrong, you are accessing Internet through university's systems, so the access is granted by those systems. The fact that you can connect to a port in one way doesn't mean you can connect to that same port the other way.

A connection is stablished through two ports, one through wich connection is originated and one that receives it. Usually, the originating port is provided by the system and you don't have control on it (it may appear as a random number to you), on the other side, the destination port should be always the same, otherwise you wouldn't know where to stablish connection to.

Firewalls allow control on communications in both ways, so you can limit access to a port outside your network or you can limit access to a port inside the network. So, you can surf the net through port 80 but that doesn't mean you can host a web server in port 80.

You have to deal with the router because it is the one that gives you access to the outside. You could probably configure your router to route all trafic to a DMZ machine. That way you won't need the router to port forward, and you will have all Internet traffic arriving to your machine, so that machine should have a firewall set up for the incoming traffic if you don't want surprises. (Here is where I get lost, are you accessing Internet through University's machines or are you accessing through a DSL router? if you have control of the router you can configure it as you please.)


All times are GMT -5. The time now is 03:45 AM.