# SOCKS5 proxy

A listener of the protocol **SOCKS (SOCKS://)** makes CrushMFT a SOCKS5 proxy: a program connects to the listener, says where it wants to go, and the server makes that connection for it. The other side sees the server's address.

It is for letting known users and programs reach other systems **through** the server, under the server's control and in the server's log. It is an Enterprise feature.

![The Advanced tab of a SOCKS listener](Ports-SOCKS5/advanced.png)

The listener itself has no settings beyond those every listener has. What is allowed is decided per user.

## Setting it up

1. **Add a listener** of the protocol SOCKS in [IP / Servers](Ports.md), on a port of its own; 1080 is usual.
2. **Allow the users.** In the User Manager, add **SOCKS** to the allowed protocols of each user who may use the proxy: [Protocols a user may use](Users-Restrictions-Protocols.md). To allow use without a login, do it on the user `anonymous`.
3. **Say where they may go.** On the [Restrictions](Users-Restrictions.md) tab of the user:

   | Setting | What it is | New user |
   |---|---|---|
   | **Allowed destination SOCKS proxy hosts / IPs** | one per line, wildcards allowed | `*`: everything |
   | **Blocked destination SOCKS proxy hosts / IPs** | one per line, wildcards allowed | empty |

4. **Log it.** Turn on the log kind **SOCKS_PROXY** in [Logging](Prefs-Logging.md), so that every connection is written down.
5. **Point the program** at the server's address and the listener's port, as a SOCKS5 proxy, with the user's name and password.

Clients log in with user name and password, or not at all where `anonymous` is allowed. Kerberos and other login methods are not offered.

## Before you open it

A proxy that anyone can use is used by anyone, for anything, in your name.

- Never allow SOCKS on `anonymous` on a listener the internet can reach.
- Replace `*` by the destinations the users really need.
- Restrict the listener by address: [IP restrictions of a port](Ports-IP-Restrictions.md).
- Remember that a destination is reached **from the server**. A user who may go to `10.*` reaches your internal network through it.

## Relatives

| You want | Use |
|---|---|
| a browser to reach other web sites through the server | **Allow Forward Proxy** on a web listener: [HTTP and HTTPS ports](Ports-HTTP.md) |
| one port to be passed on to one fixed machine | [Port forwarding](Ports-Port-Forward.md) |
| requests for some addresses to go to another web server | [The reverse proxy](Ports-Reverse-Proxy.md) |
