Socks Client For Linux

socks client on linux – LinuxQuestions.org

Home
Forums
Reviews
Tutorials
Articles
Register
Search
> Forums
> Linux Forums
> Linux – Networking
socks client on linux
User Name
Remember Me?
Password
Linux – Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to, 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 Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register NowIf 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.
Search this Thread
11-29-2011, 02:15 PM
#1
zeusys
Member
Registered: Jun 2006
Posts: 31
Rep:
Hi
I have access to a socks server, and I use it by Proxifier software in windows.
I want to know is there any alternative for Proxifier in linux?
Thanks
11-29-2011, 09:48 PM
#2
evo2
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6, 206
I’ve used tsocks for years and have been quite happy with it.
Cheers,
Evo2.
11-29-2011, 11:23 PM
#3
Original PosterRep:
I want to pass my browser(firefox or chrome) traffic through a socks server.
How should I configure tsocks and browser to achieve this?
11-29-2011, 11:48 PM
#4
For browsers you shouldn’t need to use tsocks: instead most browsers have built in proxy support. If you use a desktop environment 9eg gnome, kde, etc) then chrome/chromium will use whatever proxy is set there. If you don’t use a desktop environment you can write a file and start your browser with the –proxy-pac-url option.
For example, I start my browser as follows:
Code:
chromium –proxy-pac-url=file${HOME}/
Where $HOME/ looks something like:
function FindProxyForURL(url, host)
{
return “SOCKS 192. 168. 1. 123:8765”;}
where the IP and port correspond to the location of your socks proxy.
IIRC firefox proxy can be set using the configuration menues, but I think you may also need to dig a little deeper to make its DNS calls also use the proxy.
If you want to use tsocks for something, you configure it in /etc/ an can use it with random programs in the following fashion:
tsocks someprogram
HTH,
11-30-2011, 08:05 AM
#5
ambrop7
Registered: May 2011
Distribution: Gentoo
Posts: 98
With my tun2socks software it is possible to forward all TCP through SOCKS5 seamlessly,
01-04-2012, 05:25 AM
#6
grandcanyon
LQ Newbie
Registered: Jan 2012
Location: spain
Distribution: ubuntu
Posts: 1
Quote:
Originally Posted by evo2
GREAT! tsocks is not working for me (i dont know why), but your trick is about to save my life!
It’s working with ubuntu oneiric and socks5 and chromium-browser, only had to add
change SOCKS for SOCKS5 at the script because of my socks version.
many thanks man!
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
Forum Rules
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
socks client wrapper for cygwin
phil. d. g
General
0
03-11-2011 05:42 PM
using socks proxy with torrent client
jamesbon
Linux – Networking
2
01-22-2011 04:20 AM
ftp client witch socks proxy support
Sammy2ooo
1
11-26-2003 07:44 PM
IRC Client with Socks Proxy Capability
friendklay
Linux – Software
05-28-2003 05:58 PM
All times are GMT -5. The time now is 09:57 PM.
Contact Us –
Advertising Info –
Rules – Privacy –
LQ Merchandise –
Donations –
Contributing Member –
LQ Sitemap –
Main Menu
Linux Forum
LQ Tags
Linux Tutorials
LQ Job Marketplace
LQ Deals
Linux Wiki
Distro Reviews
Book Reviews
Download Linux
Social Groups
LQ Blogs
(Con’t)
Advertisement
My LQ
Login
Write for LQ
is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you’d like to contribute
content, let us know.
LQ Calendar
LQ Rules
LQ Sitemap
Site FAQ
View New Posts
View Latest Posts
Zero Reply Threads
LQ Wiki Most Wanted
Jeremy’s Blog
Report LQ Bug
Syndicate
Latest Threads
LQ News
Twitter: @linuxquestions
How to setup SOCKS proxy in Linux - Lintel Technologies Blog

How to setup SOCKS proxy in Linux – Lintel Technologies Blog

A SOCKS server is a general purpose proxy server that establishes a TCP connection to another server on behalf of a client, then routes all the traffic back and forth between the client and the server. It works for any kind of network protocol on any port. SOCKS Version 5 adds additional support for security and UDP.
Use of SOCKS is as a circumvention tool, allowing traffic to bypass Internet filtering to access content otherwise blocked, e. g., by governments, workplaces, schools, and country-specific web services
Using SSH
SOCKS proxies can be created without any special SOCKS proxy software if you have Open SSH installed on your server and an SSH client with dynamic tunnelling support installed on your client computer.
ssh -D 1080 user@
Now, enter your password and make sure to leave the Terminal window open. You have now created a SOCKS proxy at localhost:1080. Only close this window if you wish to disable your local SOCKS proxy.
Using Microsocks program
MicroSocks is a multithreaded, small, efficient SOCKS5 server.
It’s very lightweight, and very light on resources too:
for every client, a thread with a stack size of 8KB is spawned. the main process basically doesn’t consume any resources at all.
the only limits are the amount of file descriptors and the RAM.
It’s also designed to be robust: it handles resource exhaustion gracefully by simply denying new connections, instead of calling abort() as most other programs do these days.
another plus is ease-of-use: no config file necessary, everything can be done from the command line and doesn’t even need any parameters for quick setup.
Installing microsocks
“`git clone `
“`cd microsocks“`
“`make“`
Starting socks service
microsocks -1 -i listenip -p port -u user -P password -b bindaddr
all arguments are optional. by default listenip is 0. 0. 0 and port 1080.
option -1 activates auth_once mode: once a specific ip address authed successfully with user/pass, it is added to a whitelist and may use the proxy without auth. this is handy for programs like firefox that don’t support user/pass auth. for it to work you’d basically make one connection with another program that supports it, and then you can use firefox too.
How to force all Linux apps to use SOCKS proxy - Super User

How to force all Linux apps to use SOCKS proxy – Super User

for the impatient just do the following; assuming that the proxy is and it’s socks5 (change it with your own later)
first install redsocks sudo apt-get install redsocks, make an empty file anywhere and name it (or whatever), I’ll assume it’s here /etc/ (change it with your own).
edit the file you created () as follows
base {
log_debug = on;
log_info = on;
log = “stderr”;
daemon = off;
redirector = iptables;}
redsocks {
local_ip = 127. 0. 1;
local_port = 12345;
ip =;
port = 7777;
type = socks5;
// known types: socks4, socks5, -connect, -relay
// login = username;
// password = password;}
change 7777 with your proxy,
(note that you can use any local_port other than 12345, it’s the local port that we will set an iptable rule to redirect the traffic to, so if you use another, make sure to use it in later steps below)
— now run redsocks with the config file destination as follows
sudo redsocks -c /etc/
change with the destination of your
(if you get “bind: Address already in use” try killall redsocks)
you can also check if redsocks is bound to local port 12345 with netstat -tulpn
— now that redsocks is running and ready, let’s change the iptables rules to use redsocks. this should be customized to your needs, but if you like to redirect all HTTP and HTTPS packets through the proxy. Define the following rules.
sudo iptables -t nat -N REDSOCKS
sudo iptables -t nat -A REDSOCKS -d 0. 0/8 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 10. 0/8 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 127. 0/8 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 169. 254. 0/16 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 172. 16. 0/12 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 192. 168. 0/16 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 224. 0/4 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 240. 0/4 -j RETURN
sudo iptables -t nat -A REDSOCKS -p tcp -j REDIRECT –to-ports 12345
sudo iptables -t nat -A OUTPUT -p tcp –dport 443 -j REDSOCKS
sudo iptables -t nat -A OUTPUT -p tcp –dport 80 -j REDSOCKS
sudo iptables -t nat -A PREROUTING -p tcp –dport 443 -j REDSOCKS
sudo iptables -t nat -A PREROUTING -p tcp –dport 80 -j REDSOCKS
now your and traffic should be redirected through
if you want your iptables reset use:
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
additional tip: if you have vpn on your iphone or android, you can use it for free in your pc whatever the OS is. just connect the phone vpn app, and establish a socks proxy server ( in android you can use ‘servers ultimate’ app) then use the proxy in your pc as above, now all your pc traffic is routed through your phone vpn. neat.

Frequently Asked Questions about socks client for linux

Leave a Reply

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