2

I'm trying to configure 3proxy on Ubuntu 22.04, following the instructions on the developer's website as well as tutorials from the internet. I need a standard HTTP proxy. All HTTP and HTTPS ports are allowed, but I'm getting an error:

$ curl -x http://username:[email protected]:3128 https://ifconfig.io
curl: (7) Failed to connect to 192.168.1.47 port 3128 after 30 ms: Connection refused

Here is my config /etc/3proxy/3proxy.cfg

nscache 65536
nserver 192.168.1.1
config /conf/3proxy.cfg
monitor /conf/3proxy.cfg
counter /count/3proxy.3cf
users $/conf/passwd
include /conf/counters
include /conf/bandlimiters
auth strong
deny * * 127.0.0.1
allow * * * 80 HTTP # HTTP & HTTPS are allowed!
allow * * * 443 HTTPS # HTTP & HTTPS are allowed!
proxy -n -p 3128 -a # 3128 PORT!
flush
allow

And I can't figure out where the config with users and passwords is stored? I added a user through

add3proxyuser.sh <username> <password>

Maybe something wrong with the firewall? But I haven't installed a firewall software.

1 Answer 1

1
  1. Make sure you have the correct folder and file permissions:
 sudo chmod 755 /etc/3proxy
 sudo chmod 600 /etc/3proxy/3proxy.cfg;
  1. Here is my config that works good and I use it on all servers:
# Google DNS
nserver 8.8.8.8
nserver 8.8.4.4

nscache 65536
timeouts 1 5 30 60 180 1800 15 60

# Proxy accounts stored in this file
users $/etc/.proxyauth

# Specify daemon as a start mode
daemon

authcache user 60
auth strong cache

deny * * 127.0.0.1
allow * * * 80-88,8080-8088 HTTP
allow * * * 443,8443 HTTPS
allow * * * 1-65535 HTTP
allow * * * 1-65535 HTTPS

# 3128 port as you wanted
proxy -n -p3128 -a
  1. Users and passwords file /etc/.proxyauth ("CL" means that passwords are stored without encryption):
<username1>:CL:<password1>
<username2>:CL:<password2>
  1. Don't forget to restart after changes:
sudo systemctl restart 3proxy

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .