New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
SOCKS5 proxy server setup?
I can't find any guide online for some reason.. How does one setup Socks5 proxy with authentication on debian/ubuntu server? Do I need to install some daemon that does the job, or is the functionality already integrated in the Linux OS?
My intention is to allow a remote client use this socks5 proxy with authentication.
Comments
In a way, ssh is a socks5 proxy with auth.
I dont know what keyword did you use but guide to set up socks with auth is everywhere on internet.
https://www.google.com/search?q=dante+set+up+socks5+auth&ie=utf-8&oe=utf-8
Another less convoluted way is to use shadowsocks with user management.
@stefeman I used http://tech.tiq.cc/2012/06/how-to-set-up-danted-dante-server-socks-proxy-on-linuxdebian-with-authentication/ though am having trouble finding browsers and apps that support auth for SOCKS.
Have privoxy handle auth, then listen on localhost:something as a proxy itself
Thanks for the answers I'll manage to setup something with these guides now.
you will need this.
usually i use squid proxy . then i can auth user and passwd .
I've seen that some bittorrent client can handle a socks proxy. In that case which socks server would redirect an open port to the client?
Why is cloudflare so lenient to you?
BTW : THanx for the code
Once again, Shadowsocks.
1. Pip install shadowsocks
2. Edit config file with password.
3. sudo ssserver -c /path/to/config.json -d start
4. Profit.
Example config.json:
{ "server":"0.0.0.0", "server_port":8388, "local_address": "127.0.0.1", "local_port":1080, "password":"password", "timeout":300, "method":"aes-256-cfb", "fast_open": false }
There is also an auto install script for danted server google it.
This
https://github.com/teddysun/shadowsocks_install
My ISP has not many customers and excellent IP reputation; i rarely see any captchas at all from CF. I do get the JS check at times though and pay for that luxury with CF not having a POP here routing me back to NL/DE.
I tried this and installed the libev-debian.sh method.
However, the issue is that when I try to input it to firefox for example, it does not connect at all =/
Same with my utorrent application.
I have no idea what the username is supposed to be, so I went with
root:shadowsockspassword
CentOS 6 Instructions
yum install epel-release
yum install wget htop nano tmux nload
yum update
yum upgrade
reboot
yum install system-config-firewall-tui dbus-python dbus
service messagebus start
system-config-firewall-tui
tab over the the "[*] Enabled" and press your spacebar so the * is gone from the [ ] and then press okay
then
Download the latest source rpm from sourceforge.net
wget http://downloads.sourceforge.net/ss5/ss5-3.8.9-6.src.rpm
Build the source rpm
This requires the rpmbuild tool provided by rpm-build package. Also, ss5 requires openldap-devel, pam-devel and openssl-devel development packages. Install these packages using YUM package manager:
For 32 bit Linux,
yum install gcc rpm-build openldap-devel pam-devel openssl-devel -y
For 64 bit Linux,
yum install gcc.x86_64 rpm-build.x86_64 openldap-devel.x86_64 pam-devel.x86_64 openssl-devel.x86_64 -y
Now build ss5 source rpm to create the binary rpm package:
rpmbuild --rebuild ss5-3.8.9-6.src.rpm
Install SS5 rpm package
On CentOS 5.x, the RPM package will be created in /usr/src/redhat/RPMS/. On CentOS 6.x, RPM package will we created in the subdirectory rpmbuild/RPMS/ of build directory. You can install the RPM package using following command:
On CentOS 5,
rpm -ivh /usr/src/redhat/RPMS/x86_64/ss5-3.8.9-6.x86_64.rpm (for 64 bit Linux)
rpm -ivh /usr/src/redhat/RPMS/i386/ss5-3.8.9-6.i386.rpm (for 32 bit Linux)
On CentOS 6,
rpm -ivh rpmbuild/RPMS/x86_64/ss5-3.8.9-6.x86_64.rpm (for 64 bit Linux)
rpm -ivh rpmbuild/RPMS/x86_64/ss5-3.8.9-6.i386.rpm (for 32 bit Linux)
Run SS5 as root and change the port to 8899 (default port is 1080)
Edit /etc/init.d/ss5 and put following lines at the top after shabang(#!/bin/sh):
export SS5_SOCKS_PORT=8899
export SS5_SOCKS_USER=root
You can use any available port you want. Make sure that the port is opened in the server firewall, if any.
5. User/password authentication
SS5 configuration file is /etc/opt/ss5/ss5.conf. The ‘auth’ directive sets the authentication policy.
For no authentication,
auth 0.0.0.0/0 - -
For user/pass authentication,
auth 0.0.0.0/0 - u
The user/password pairs are stored in /etc/opt/ss5/ss5.passwd. Make sure that this file is readable only by root:
chown root.root /etc/opt/ss5/ss5.passwd
chmod 750 /etc/opt/ss5/ss5.passwd
In /etc/opt/ss5/ss5.passwd, put user and password separated by a space and one user/password per line.
E.g.
user1 pass1
user2 pass2
6. Set permission
Allow all hosts to connect:
permit - 0.0.0.0/0 - 0.0.0.0/0 - - - - -
service ss5 start
If you see an error message like the following,
Can’t create pid file /var/run/ss5/ss5.pid
Can’t unlink pid file /var/run/ss5/ss5.pid
create the directory /var/run/ss5 and start ss5 again.
That’s all.
I'd rather use shadowsocks on debian to keep it ultra simple. However I could use help with the above issue. Thanks everyone so far.
Do I need to set
net.ipv4.ip_forward = 1
after running the auto-install script?Shadowsocks needs a client application to work. If you just need to use the proxy you don't have to set up forwarding.
No. It is only required if you are routing at the IP level, such as VPN. Shadowsocks is not a VPN.
As said above, have you set up the shadowsocks client as well? More importantly, do you understand the difference between shadowsocks and the 'standard' socks?
And then make your bowser's proxy 127.0.0.1:1080 and it should work.
I'll try to find a English GUI picture for you.
Download here:https://github.com/shadowsocks/shadowsocks-windows/releases
@stefeman Which one do you use?