Watch TV online from abroad with SSH

NOTE: These instructions are for Linux.

Watch TV from any Country

Are you traveling a lot? You might be living in another country. The problem is still the same, you would like to see those TV programs from your home country but can’t since you’re getting that annoying message that you don’t have a local IP address making it impossible to watch anything. The hard part can be to have an available computer or server where to connect. A cheap way is to buy and configure a raspberry pi and leave it with at a friends house. They consume hardly anything so it won’t affect the electricity bill. Anyway, lets get started shall we. First of all, we need to use SSH to connect to the server and set up a dynamic link (SOCKS5) to a local port on our own computer. This is done like this:

ssh -f -N -D localhost:9999 user@ssh-server.com -p 22
-f Start in the background. Using this option lets you continue controlling the terminal window. (not necessary though)
-N Don’t start a shell (we don’t need one).  You could leave this option out if you are planning to also work on the remote server through a shell
-D From the manual:  Specifies a local “dynamic” application-level port forwarding. This works by allocating a socket to listen to port on the local side, optionally bound to the specified bind_address. Whenever a connection is made to this port, the connection is forwarded over the secure channel, and the application protocol is then used to determine where to connect to from the remote machine.So in this case, we specified localhost (our own computer) and port number 9999 (you can specify the port you want)
-p The default port is already 22. It’s just added to show how you can specify which port to connect to if the ssh server your are connecting to is using a non standard port number.

For browsers like Chrome you need to change your proxy settings for the system in order for this to work. We’ll use Firefox, this will leave the rest of the system as is.

  • Open Firefox
  • Enter Preferences
  • Select Advanced
  • Click “Settings…” where it says Connection (Configure how Firefox connects to the Internet)
  • Change the Proxy settings as below:

Firefox Proxy Settings SSH Now entering this site you can check you current IP address. Open Chrome or Safari and enter the very same site you will notice that each browser has its own IP address. Now in Firefox you can enter the local TV sites and watch any video as if you where in the country. Enjoy… /jima  

Leave a Reply

Your email address will not be published. Required fields are marked *