Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
03-08-2014, 04:33 PM
|
#1
|
Member
Registered: Dec 2006
Posts: 381
Rep:
|
anyway to tunnel all network traffic of a single app via an ssh?
i have an ssh tunnel setup fine but i wan't to be able to send all traffic from one app through it.. can it be done?
|
|
|
03-10-2014, 02:02 AM
|
#2
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
Quote:
Originally Posted by steve51184
i have an ssh tunnel setup fine but i wan't to be able to send all traffic from one app through it.. can it be done?
|
yes. For this I use socks proxy over ssh (-D option), and proxychains for the client program.
Eg.
Create the tunnel
Code:
ssh -f -N -D localhost:5555 myserver.some.where
Configure proxychains
Code:
echo 'socks4 127.0.0.1 5555' >> /etc/proxychaings.conf
Use the tunnel with some program
Code:
proxychains someprogram
HTH,
Evo2.
|
|
1 members found this post helpful.
|
03-10-2014, 02:04 AM
|
#3
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
one more thing, you don't need root for this since proxychains will also look for a config file in ~/.proxychains.conf
Evo2.
|
|
|
03-10-2014, 12:29 PM
|
#4
|
Member
Registered: Dec 2006
Posts: 381
Original Poster
Rep:
|
hmm tried that but just can't seem to get it to work
|
|
|
03-10-2014, 08:24 PM
|
#5
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
Quote:
Originally Posted by steve51184
hmm tried that but just can't seem to get it to work
|
can you be more specific?
Evo2.
|
|
|
03-10-2014, 08:38 PM
|
#6
|
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983
|
Quote:
Originally Posted by steve51184
hmm tried that but just can't seem to get it to work
|
copy paste with code flags what you did and what happened directly from the CLI.
|
|
|
03-10-2014, 11:56 PM
|
#7
|
Member
Registered: Dec 2006
Posts: 381
Original Poster
Rep:
|
i ran the following command to open the socks proxy on port 5555:
Code:
ssh -f -N -D localhost:5555 server.ip
i then saved the following in /etc/proxychains.conf (well i edited the old config to remove the default tor line etc):
Code:
socks4 127.0.0.1 5555
i then ran the following (just a test i know it can be done within chrome much better etc):
Code:
proxychains /usr/bin/google-chrome-stable
all i get is 'This web page is not available' via chrome (and likewise other apps also have no internet access)
this is the output via command line for the above command: http://pastie.org/pastes/8906135/tex...utkrtjfznfd2bw
Last edited by steve51184; 03-10-2014 at 11:58 PM.
|
|
|
03-11-2014, 12:20 AM
|
#8
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
ok from the pastebin I can see that libproxychains.so.3 is not being found. Was ldconfig run by the postinstall script? If not please try running it now (as root). You may also need to log out and back in again (but I'm just guessing here).
If the above fails then _instead_ of running the proxychains script do:
Code:
export LD_PRELOAD=/usr/lib/libproxychains.so.3
someprogram
The only difference between this and using the proxychains script is that the full path is specified for LD_PRELOAD.
Evo2.
|
|
|
03-11-2014, 12:32 AM
|
#9
|
Member
Registered: Dec 2006
Posts: 381
Original Poster
Rep:
|
/usr/lib/libproxychains.so.3 isn't on my system? :/
|
|
|
03-11-2014, 12:50 AM
|
#10
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
what is the output of the following?
Code:
find /usr/lib -name libproxychains.so.3
Evo2.
|
|
|
03-11-2014, 12:50 AM
|
#11
|
Member
Registered: Dec 2006
Posts: 381
Original Poster
Rep:
|
/usr/lib/x86_64-linux-gnu/libproxychains.so.3
|
|
|
03-11-2014, 12:52 AM
|
#12
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
ok, so use that path.
Evo2.
|
|
|
03-11-2014, 12:53 AM
|
#13
|
Member
Registered: Dec 2006
Posts: 381
Original Poster
Rep:
|
sorry to sound dumb but what do i do with the following? :/
Code:
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libproxychains.so.3
COMMAND
|
|
|
03-11-2014, 12:56 AM
|
#14
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
run it in a terminal replacing "COMMAND" with whatever command you want to run eg chrome-chrome-stable. Look at the contents of /usr/bin/sockproxy to understand why.
Evo2.
|
|
|
03-11-2014, 12:59 AM
|
#15
|
Member
Registered: Dec 2006
Posts: 381
Original Poster
Rep:
|
/usr/bin/sockproxy is empty :/
also same problem no internet access for the app although the libproxychains.so.3 error is gone:
Code:
[22084:22134:0311/045814:ERROR:download.cc(356)] PostClientToServerMessage() failed during GetUpdates
[22084:22084:0311/045814:ERROR:CONSOLE(0)] "Application Cache Error event: Manifest fetch failed (-1) https://www.google.co.uk/_/chrome/newtab/manifest?espv=2&ie=UTF-8", source: https://www.google.co.uk/_/chrome/newtab?espv=2&ie=UTF-8 (0)
[22084:22084:0311/045815:ERROR:CONSOLE(0)] "Error in event handler for (unknown): TypeError: Cannot read property 'debug' of undefined
at chrome-extension://dhnaagndnllbblbgeimdkknegobbpohk/imagezoomer.js:35:23
at disconnectListener (extensions::messaging:338:9)
at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14)
at Event.dispatchToListener (extensions::event_bindings:394:22)
at Event.dispatch_ (extensions::event_bindings:378:27)
at Event.dispatch (extensions::event_bindings:400:17)
at dispatchOnDisconnect (extensions::messaging:293:27)", source: https://www.google.co.uk/_/chrome/newtab?espv=2&ie=UTF-8 (0)
|
|
|
All times are GMT -5. The time now is 06:50 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|