LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Reroute ports (https://www.linuxquestions.org/questions/linux-networking-3/reroute-ports-70979/)

Thermos 07-08-2003 11:02 AM

Reroute ports
 
i gotta a linksys BEFSR41 router and it appears i am forced to forward incoming ports to a pc w/ the same port.

example:
i need to be able to have the incoming port 135 to port 22 so i can ssh to my linux box at home from work. (they block most of my ports at work)

im running Red Hat 9 on that pc. how would this be possible to reroute these on the linux box itself?

thnx in adv

mlp68 07-08-2003 12:53 PM

I guess there's nothing that cannot be achieved with iptables when it comes to do creative things with ports. But you can do this much easier. Patch port 135 through just as you described. Then start a sshd on port 135 and that's it. Simple number change in thr sshd config, or start a real 2nd one with a different config file.

Hope it helps,
mlp

david_ross 07-08-2003 12:57 PM

You could just tell ssh to listen on port 22 and port 135.
1) Edit "sshd_config" and add this near the top (before any listenaddress values):
Port 22
Port 135
2) Restart sshd
3) Edit your linux firewall config to allow connections to port 135 (if you have a firewall running)
4) Edit your router config to forward the port

Thermos 07-08-2003 02:06 PM

oh sweet. didnt realize i could run ssh to listen on different ports. thanks guys, i got my problem fixed.


All times are GMT -5. The time now is 08:13 PM.