MikroTik RouterOS proxy setup
RouterOS 7.20 and newer can forward chosen TCP connections from your network to a SOCKS5 proxy with a login. Older versions and the web proxy cannot sign in to our gateway.
- Protocols
- SOCKS5 with username and password, through Socksify (RouterOS 7.20 and newer)
- UDP
- No: Socksify forwards TCP only; UDP (QUIC, DNS, calls) leaves the router directly
- Where the setting is
/ip/socksifyplus adstnatrule withaction=socksify, in the Terminal- Works with
- Residential and mobile proxies
Before you start
- RouterOS 7.20 or newer (
/system/resource/printshows the version). Socksify arrived in 7.20 (September 2025), and 7.21 fixed a stability problem with it, so use 7.21 or later if you can. - Your proxy login and password from the Residential or Mobile page of the dashboard.
- The devices to send through the proxy: one address or a subnet. The examples use the default LAN
192.168.88.0/24.
- Host
gate.aeonproxy.com- Port (SOCKS5)
7001- Login
- your proxy login, with targeting keys if you need them:
LOGIN-cc-us-sid-abc123 - Password
- your proxy password
Copy the login and password from the Residential or Mobile page of the dashboard; the generator there also writes ready lines. Key syntax: targeting and sessions.
What RouterOS can and cannot do
- Web proxy (
/ip/proxy): its parent proxy has an address and a port, no username or password. Our gateway asks every connection for a login, so this does not work. - SOCKS server (
/ip/socks): makes the router a proxy for your devices. It is not a client. - Socksify (
/ip/socksify): a SOCKS5 client withsocks5-userandsocks5-password. It takes an IPv4 address only (no host name), forwards TCP only, refuses private LAN destinations, and new records start disabled.
Add the proxy
Run these in a Terminal (WinBox → New Terminal, or SSH). [:resolve gate.aeonproxy.com] puts in the gateway's IPv4 address, looked up with the router's own DNS settings:
/ip/socksify
add name=aeon socks5-server=[:resolve gate.aeonproxy.com] socks5-port=7001 \
socks5-user=LOGIN-cc-us-sid-office1-ttl-60 socks5-password=PASSWORD disabled=no
/ip/firewall/filter
add chain=input action=accept protocol=tcp dst-port=952 \
src-address=192.168.88.0/24 comment="LAN to socksify"
add chain=forward action=drop protocol=udp dst-port=443 \
src-address=192.168.88.0/24 comment="no QUIC, browsers use TCP"
/ip/firewall/nat
add chain=dstnat action=socksify socksify-service=aeon protocol=tcp \
dst-port=80,443 dst-address-type=!local src-address=192.168.88.0/24- The NAT rule sends web connections (ports 80 and 443) from the LAN to the service, which opens them through the gateway.
dst-address-type=!localkeeps WinBox, SSH and other connections to the router out of the proxy, so you cannot lock yourself out.- The input rule lets the connections reach the service on port 952. The UDP 443 drop stops QUIC, which Socksify cannot carry, so browsers fall back to TCP. Move a rule up if an earlier rule in its chain drops or accepts the same traffic.
DNS still goes out from your own network: Socksify forwards the IP address the device already looked up. print detail shows the SOCKS5 password in plain text, so keep admin access to the router tight.
Check the proxy
On a device in the subnet, open /ip-checker: the IP and country should be the exit's. On the router, /log/print where topics~"socksify" shows what the service did, for example *cannot socksify LAN destination*.
Rotating or sticky
Socksify opens a separate SOCKS5 connection for each TCP connection. With a rotating login one web page would load from many IPs and sign-ins would drop, so use the sticky login above: the whole subnet shares one exit for up to 60 minutes, then the key moves to a new IP in the same country. For a second exit, add another record with another key and a NAT rule for that group's addresses.
RouterOS applies a change to the record only after you disable and enable it again: /ip/socksify disable [find name=aeon], then /ip/socksify enable [find name=aeon]. If the gateway address ever changes, run /ip/socksify set [find name=aeon] socks5-server=[:resolve gate.aeonproxy.com] and restart the record the same way.
If RouterOS cannot do it
On a version older than 7.20, or when UDP must use the proxy too, set the proxy on the devices themselves (Windows, Android).
If it does not work
| What you see | What to check |
|---|---|
| Devices still show your own IP | The NAT rule does not match (addresses, ports), the record is still disabled, or the page came over QUIC. |
| Sites time out after adding the rule | The input rule for port 952 is missing or below a drop rule, the login is wrong, or the gateway address is old. |
| Pages half load, sign-ins drop | A rotating login: use -sid-…-ttl-60. |
| No WinBox or SSH access | The NAT rule lacks dst-address-type=!local. Fix it over the console or a MAC WinBox connection. |
Questions
No, only TCP. Our gateway relays SOCKS5 UDP, but RouterOS has no client for it: drop UDP 443 to keep browsers on TCP, and set the proxy on devices that need UDP.
A sub-user with its own GB limit is safer: its password sits in plain text in the router config, and the limit caps what the router can spend.