how to connect to a remote desktop behind a router?

10,032

You can use Gogo6 and get an IPv6 address at the same time:

On the server, download and install the Gogo6 client with:

sudo apt-get install gogoc

And get an account at http://www.gogo6.com/freenet6/registration for Freenet6.

Then, run gksudo gedit /etc/gogoc/gogoc.conf(still on the server) and set the following settings:

userid=your_user_name_you_set_up_with_the_link_above
passwd=your_password

Save and reboot. You can now access your_user_id.broker.freenet6.netas long as the SSH client is set up to bind to that interface. You can just bind it to 0.0.0.0, which is the default IIRC.

It should allow access from IPv4 hosts, but I will check on that.

Share:
10,032
amol.kamath
Author by

amol.kamath

Updated on September 18, 2022

Comments

  • amol.kamath
    amol.kamath over 1 year

    Here's my setup: I have a laptop that I roam around everywhere with, and I have a desktop computer at home that is connected to the web using a router with NAT.

    My objective here is to create an SSH server which I can use for the purpose of file storage/access as well as using it as a proxy server. However, the problem is that the desktop (which i'm using as the SSH server) is on a router behind a NAT. This means I can't connect to the server from outside my home network.

    I want to be able to connect directly to my desktop from an outside network using the laptop. Here are the options I've found on the web so far:

    1. Teamviewer - I really don't want to use this, I tried it and didn't like it one bit.

    2. Configure port forwarding on the router - Again, not an option since the router is actually operated by the ISP and they won't let me reconfigure it.

    3. Using a program called pwnat which I found here - This seems like the most viable of all my options, but I haven't been able to figure out how to get it to work. Also, from the poor documentation, it seems to be quite a pain to use as well.

    4. Reverse tunnel as show here - This cannot work as I don't have a "middle" computer

    Is there some way I can make the connection through SSH from the laptop on a regular basis? Otherwise, is there some other alternative that will let me use the desktop as a file server and proxy?

    Edit: There was another alternative provided below by ObsessiveFOSS

    1. Using the gogo6 client - Seemed like a good option, but I couldn't make it work. Possibly because my ISP/Router doesn't appear to support IPv6.
    • Admin
      Admin over 11 years
      Are you sure you cannot configure port forwarding in the router? That's weird on a domestic router. That would be the easiest option.
    • Admin
      Admin over 11 years
      OK is the router connected to a modem, or is the router the modem?
    • Admin
      Admin over 11 years
      Did Teamviewer work with your setup? If it did, it's very likely that ssh works as well if you configure it to use the right port(s).
    • Admin
      Admin over 11 years
      The proper way to enable ssh access from the outside would be to port forward the router. Some additional information about the ISP and router (make and model) are needed here. I (and i'm sure most others) find it hard to believe that the ISP would disallow the customer access to the routers UI for modification.
    • Admin
      Admin over 11 years
      Can you forward ports on the machine where the SSH client is running?
    • Admin
      Admin over 11 years
      @Anthony Some ISP's run more than one customer on an IP address and don't allow this.
    • Admin
      Admin over 11 years
      Thanks for the responses guys. As I mentioned above, Port forwarding cannot be done. This is because I live in India, where the ISPs typically put a whole bunch of sytems on one router/modem, which they then have full control over. So, in short, port forwarding is not possible from either client or server side. @TardisGuy The router IS the modem Teamviewer worked, but as I said above, I didn't like it at all. It was painstakingly slow and kept on crashing.
  • amol.kamath
    amol.kamath over 11 years
    Okay, this seems interesting. I'm at school right now, but I will try it once I get back. I'm curious though, wouldn't you need to configure the server with this as well?
  • nanofarad
    nanofarad over 11 years
    You install gogoc on the server. Sorry if I was unclear.
  • amol.kamath
    amol.kamath over 11 years
    Oh, sorry, my bad. Didn't notice that bit. Is there a tutorial somewhere that could tell me how to bind to the freenet6 interface from the SSH client?
  • nanofarad
    nanofarad over 11 years
    I recommend you install openssh-server. It binds to all hosts. I am not totally sure you can access the server from an IPv4 network, but you might be able to do so. If it fails to connect from IPv4, you can also install the Gogo6 clent on the client machine(assuming you travel with a laptop or have permission to install it).
  • nanofarad
    nanofarad over 11 years
    A Windows binary can be found at here(32-bit) or here(64-bit)
  • amol.kamath
    amol.kamath over 11 years
    Right. It would appear I couldn't manage to make it work. Might be because I'm on IPv4 from both host and client. Thanks anyway though.
  • Antonello
    Antonello about 8 years
    It seems they no longer accept registrations: "Freenet6 Pro is undergoing repair and not currently available. Please check back later". Any alternative?
  • nanofarad
    nanofarad about 8 years
    @Antonello Try hurricane electric. They have free accounts (and free t-shirts once you take their online course) and include templates to be pasted into /etc/network/interfaces (although they need to be tweaked if you're behind a residential router, and weren't always reliable with the router I had)