LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-06-2015, 01:19 PM   #1
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Rep: Reputation: 7
Question Remote Proxy Configuration with router


Dear Slackers,

first of all, this is not a Slackware problem. This is a network problem. I am asking on behalf of a friend of mine.
The problem. There is a stream which is only available in country B. My friend lives in country A. The stream is not available in country A. In country B there is a router with a static IP-Address provided by the Internet Service Provider. My friend wants to be able if possible to receive the stream from country B in country A. He had read that this could be possible by setting up a proxy server. I tried to search on the internet some information, but i only was able to find how to configure a router as a proxy server in the local network. My questions is - would it be possible to set up a proxy server on the router? Does he need to buy a computer additionally to the router where to run the proxy server? In the worst case he could connect remotely to that computer and start the stream from country A. Another approach would be to set up a proxy server in country B and use the IP-Address of the router in country A in the web browser. Any suggestions on how to solve this problem would be appreciated.
 
Old 11-06-2015, 02:08 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Unless that router is set up as a proxy, you likely won't be able to route through it unless you're behind that network.

A (possibly) simpler option would be to use a socks proxy through ssh. Basically, your friend would connect to your computer through ssh (I'd probably recommend creating an account for them), including some flags that opens a port on their end, then they would switch the proxy on their browser to connect through the localhost at the designated port. This can be done on both Windows (using an ssh client like putty) or on Linux. The command on their end would look something like:

Code:
ssh -D 8080 -C friend@your_IP
-D specifies the port to open the proxy on
-C enables compression

After this, your friend would go to the browser and change the proxy address to 127.0.0.1 (which points back at yourself) and port 8080. If they're on Windows, Chrome and IE use Window's proxy settings under Internet Options -> Connections tab -> LAN Settings -> Advanced and then add the address (127.0.0.1) and the port (8080) to the Socks line. You might be able to just add it to the HTTP and enable the checkmark at the bottom, but I've never tested this. Firefox has its own properties, but I don't have it in front of me.

You shouldn't need to do anything on your end other than make sure they have a valid account and that you have an ssh server up and running (Slackware has it enabled by default, but you can check to see if /etc/rc.d/rc.sshd is executable).
 
Old 11-06-2015, 05:20 PM   #3
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
bassmadrigal pretty much nailed it. There is some additional information on DNS here
It is a technique I find useful for being able to access resources from home that are otherwise only available from a work IP address.
 
1 members found this post helpful.
Old 11-06-2015, 09:57 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by allend View Post
There is some additional information on DNS here
Haha, of course Eric has a blog post about it Had I realized that, I might've just linked to it...
 
Old 11-07-2015, 02:21 AM   #5
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Hey, thank you for your answers. Unfortunately i was not able to understand where the sshd server should be set up? On the router or on a computer behind the router in country B?
 
Old 11-07-2015, 08:42 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Let's make this a bit more explicit. Your "friend" wants to tune into the US version of Netflix, in his own non-US country. Netflix, but also Amazon, ABC etc are content providers who use geo-fencing techniques to ensure that their content is only available to the people that pay for it, and additionally they provide different content based on the viewer's geographical location.

One way of achieving what you want is by using a SOCKS proxy running on a host in the US. That was what the advice regarding SSHD was about. Your "friend" will then be able to tunnel his network traffic through the resulting SSH tunnel and to the remote server it will look as if he is actually inside the US.

Watching Netflix that way is feasible when you are watching content on a laptop or desktop. It is however not possible when you have a tablet or a smart-tv, because these devices won't let you setup the network configuration appropriately. The Internet is full of "smart dns" solutions which are free, or cost you a monthly subscription. THey will offer you the IP address of a "smart DNS" server which you'll have to configure as your DNS IP address in tablet or smart-tv and from that moment on you'll be able to connect to US based content streaming providers transparently.

But think of this: in the end the comnpanies running these smart DNS services will be able to watch all your traffic since none of it will be encrypted when they proxy your connections and deliver your traffic into the US. Would you want that?

So some people have written code to setup such a Smart DNS service in private. You will still need your own host in the US (cheap VPS is easily found) so it will not be a for-free solution but you will be in control of all your outgoing traffic.
Check https://github.com/jamiees2/dnsproxy/wiki for instance.
 
1 members found this post helpful.
Old 11-12-2015, 01:34 PM   #7
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Thanks

Dear AlienBob, bassmadrigal, allend,

thank you very much for your pieces if advice. We will try to set up sshd-server on the router. If it is working, this would be acceptable. If not we have to buy a dedicated host for that. Apropos do you know by chance some routers which are of a very good quality but not meant for the business, that could do the job? Probably you have experience with some and you have done that and you know that this is working.

Sincerely yours,
glupa4e
 
Old 11-12-2015, 01:43 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
If this is a router managed by the ISP, it isn't likely you'll be able to get ssh on it (with the possible exception the router supports something like dd-wrt, which replaces the stock firmware and includes ssh). If you live in the country that has access to that stream, you can host the ssh server on your computer. Then you would just set up port forwarding on the router, and then your friend can connect without an issue.
 
Old 11-13-2015, 01:05 PM   #9
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
The router is private

Hi again, the router is private, we have the password for it. Would it be possible then to do that? I have never set up something like that on a router. Thank you for the article you have posted. I will have a look at it.
 
Old 11-13-2015, 01:17 PM   #10
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
It depends on what the router is running. If it is a commercial firmware, it may not be able to support ssh. If it is running a full blown linux OS, it probably already has ssh.
 
Old 11-13-2015, 01:21 PM   #11
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Originally Posted by glupa4e View Post
Hi again, the router is private, we have the password for it. Would it be possible then to do that? I have never set up something like that on a router. Thank you for the article you have posted. I will have a look at it.
What make and model is your router? What firmware does it have running on it? Does it provide a proxy service? Do you have shell access to it?

Your router needs to have firmware that supports what you are trying to accomplish. If it doesn't have the right firmware you will need to flash the hardware with firmware that does. In some cases routers do not support setting up a proxy server or the use of a SOCKS tunnel with SSH. There are projects out there that provide firmware that enable some feature lacking routers to accomplish this. I use DD-WRT firmware on my ASUS RT-N16 router. I am not familiar with other third party firmware though. If you do decide to flash different firmware on your router, be very careful, you can brick your router quite quickly in doing so.
 
Old 11-14-2015, 01:19 PM   #12
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
I will be looking for a DD-WRT Router

Hello and thank you for you posts. I am a little bit afraid of flashing my router because i could break it. I am thinking of buying a new one that supports DD-WRT out of the box. I assume that with it SOCKS and ssh will be possible. Any other recommendations?
 
Old 11-14-2015, 03:56 PM   #13
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Originally Posted by glupa4e View Post
Hello and thank you for you posts. I am a little bit afraid of flashing my router because i could break it. I am thinking of buying a new one that supports DD-WRT out of the box. I assume that with it SOCKS and ssh will be possible. Any other recommendations?
The Asus RT-xxx series routers are great for DD-WRT. Some Linksys models are good too, I have no experience with Linksys though. This firmware supports openvpn as well as SOCKSv4/5 by port forwarding ssh ports as mentioned earlier.
 
Old 12-06-2015, 01:24 PM   #14
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Hello again dear Slackers,

i decided to buy one ASUS RT-AC87U router. Now i started to configure it but i do not know how to proceed. I enabled the SSH-Protocol. There are some VPN settings but i do not know if i need it. How to set the user for the ssh access? Does it need to be the same as the router administrator user? Do i need to set some port forwarding? How it should be done?

Thanks!

Last edited by glupa4e; 12-06-2015 at 01:32 PM.
 
Old 12-23-2015, 09:26 AM   #15
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Finally i was not able to find out how to create additional users on the router. That is why i am connecting via ssh with the admin user to the router as suggested by AlienBob and when i make the SOCKS Proxy settings in the browser, everything is working properly. Thanks for your support!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squid proxy server configuration & distribution of internet without proxy gaurav_gupta082 Linux From Scratch 2 07-31-2010 11:25 AM
Using remote proxy! itz2000 Linux - Networking 4 05-30-2008 04:55 AM
Router/Proxy scammeh^ Linux - Networking 7 06-29-2005 09:01 AM
/etc/resolv.conf configuration when behind a router(not a linux router) rmanocha Linux - Networking 2 04-28-2004 01:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration