Sonntag, 7. Dezember 2014

Access websites restricted to a certain domain or network

Imagine you want to browse a website, that is only available within a certain domain or network, e.g. http://fritz.box from outside your local network. If you manage to have a VPN server running inside the network, you are fine with simply establishing the VPN tunnel (see e.g. RaspberryPi as VPN server). But in the other case, there is a very simple way I just got aware of.

The only prerequisite is a host within the network you have access to via SSH. In my case this is a raspberry pi connected to the router (FritzBox) via ethernet. Let us now assume you want to open the configuration page of your router (http://fritz.box) from your desktop PC at university:

Open a terminal and establish an SSH connection using the -D port option:
ssh -D 12345 user@hostInsideNetwork.de

This will make ssh act as SOCKS server tunneling every connection established to the specified port to the hostInsideNetwork. Remember that rebinding privileged ports needs root level access.

After that configure your browser to use this local bound port as SOCKS proxy:

Now you are able to access websites (e.g. http://fritz.box) within the local network, just as if you were there.

Keine Kommentare:

Kommentar veröffentlichen