Results 1 to 7 of 7

Thread: any port?

  1. #1
    7ELEVEN
    Guest

    Default any port?

    i have been playing with remote desktop 4 the past few days....i have 2 xp pro pc on my network 19.168.1.2 and 192.168.1.7 both set to remote connect on port 3398

    when im on my network i can remote connect to any of the pc's by just typing in there network ip address....192xx.XX.xx.XX but wen im not on my network (at my office) i want to log into my machines so i changed the remote desktop connection listening port to 3340 on machine "A" so i can type in my out side ip 39.69.xx.xx.xx and connect to that box and left box "B" on port 3389.

    my question is...can use any port 1-65534 to to do remote connect?

  2. #2
    My life is this forum Barry's Avatar
    Join Date
    Jan 2010
    Posts
    3,817

    Default

    Quote Originally Posted by 7ELEVEN View Post
    i have been playing with remote desktop 4 the past few days....i have 2 xp pro pc on my network 19.168.1.2 and 192.168.1.7 both set to remote connect on port 3398

    when im on my network i can remote connect to any of the pc's by just typing in there network ip address....192xx.XX.xx.XX but wen im not on my network (at my office) i want to log into my machines so i changed the remote desktop connection listening port to 3340 on machine "A" so i can type in my out side ip 39.69.xx.xx.xx and connect to that box and left box "B" on port 3389.

    my question is...can use any port 1-65534 to to do remote connect?
    Nope. Look up the port numbers on google. The first thousand or so are used. Use ports that aren't already used.
    Of course, if you really wanted to have some fun, go to Wal-Mart late at night and ask the greeter if they could help you find trashbags, roll of carpet, rope, quicklime, clorox and a shovel. See if they give you any strange looks. --Streaker69

  3. #3
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default

    Quote Originally Posted by 7ELEVEN View Post
    i have 2 xp pro pc on my network 19.168.1.2 and 192.168.1.7
    These are both private IP addresses so I'm gonna assume you're behind a NAT-enabled router.

    when im on my network i can remote connect to any of the pc's by just typing in there network ip address....192xx.XX.xx.XX but wen im not on my network (at my office) i want to log into my machines so i changed the remote desktop connection listening port to 3340 on machine "A" so i can type in my out side ip 39.69.xx.xx.xx and connect to that box and left box "B" on port 3389.
    I suggest against that. Leave both computers listening on the default port. Then go into your router settings, go into the NAT settings, and set it to forward incoming packets from port 80 to port 3389 on the first computer. Also forward port 443 to port 3389 on the second computer. It's a lot handier that way. I used to have Remote Desktop on port 80 and OpenVPN on port 443.

    my question is...can use any port 1-65534 to to do remote connect?
    Yes, but your operating system might not play friendly. For instance, when I load the Google webpage, the source port of the segment I send might be something like 2034 so you'd have a problem if your Remote Desktop was listening on 2034. If you choose a port number below 1024, you'll be fine, however I suggest 80 and 443 for getting around firewalls (I used OpenVPN on 443 when I was in college).
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

  4. #4
    My life is this forum Barry's Avatar
    Join Date
    Jan 2010
    Posts
    3,817

    Default

    The way I've set up ssh to multiple machines behind a nat would be to port forward different ports to different machines. Say I wanted to ssh into my file server, then I'd do a ssh -p 5555 whatever.homeip.net. That would forward port 5555 to 22 on the file server. If I do a ssh -p 4445 then I'd get my laptop. You can do the same with vnc, or remote desktop.
    Of course, if you really wanted to have some fun, go to Wal-Mart late at night and ask the greeter if they could help you find trashbags, roll of carpet, rope, quicklime, clorox and a shovel. See if they give you any strange looks. --Streaker69

  5. #5
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    Quote Originally Posted by Barry View Post
    The way I've set up ssh to multiple machines behind a nat would be to port forward different ports to different machines. Say I wanted to ssh into my file server, then I'd do a ssh -p 5555 whatever.homeip.net. That would forward port 5555 to 22 on the file server. If I do a ssh -p 4445 then I'd get my laptop. You can do the same with vnc, or remote desktop.
    This is the exact way I do it as well. Seems to work great.

  6. #6
    7ELEVEN
    Guest

    Default thanks

    thanks all this info helped a lot, especially that one on getting around a firewall

  7. #7
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default

    Quote Originally Posted by 7ELEVEN View Post
    thanks all this info helped a lot, especially that one on getting around a firewall
    Just another thing, some firewalls only allow SSL over port 443 (i.e. they won't allow SSL over port 80). When I was in college I had my OpenVPN server listening on port 80 but the firewall blocked SSL to port 80 so I had to change it to 443.
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •