Using OKPROXY on Linux
Prepare a server that can run 24/7 as the encrypted proxy server. The server must use a Linux x86_64 / amd64 system.
OKPROXY encrypts mining data before sending it to the pool over the internet, reducing the risk of the data being identified or disrupted while traveling across external networks. Mining machines connect to the server running OKPROXY over a local area network (LAN). Make sure both are on a trusted LAN.
Run OKPROXY
- Download OKPROXY v2.1.0.
- Create an
okproxydirectory on the proxy server and place the downloadedokproxyfile in it.sudo mkdir -p /opt/okproxy sudo cp okproxy /opt/okproxy/ sudo chmod +x /opt/okproxy/okproxy - Open the directory and run OKPROXY.
cd /opt/okproxy ./okproxy - Keep the terminal open while testing manually. For continuous operation, configure the system service under “Start OKPROXY at boot” below.
Configure the pool address
After OKPROXY starts, enter the proxy pool address in the miner dashboard or mining software. Use this format:
stratum+tcp://proxy-server-IP:port
For example, if the proxy server IP is 192.168.152.128 and BTC uses port 2222, enter:
stratum+tcp://192.168.152.128:2222
Supported coins and ports:
| Coin | Port |
|---|---|
| LTC | 1111 |
| BTC | 2222, 228, 3367 |
| BCH | 2233 |
| ETC | 4444, 7777 (E9 only) |
Assign a static IP to the proxy server
To prevent the proxy server IP from changing after a restart or network reconnection, assign a static IP to the server running OKPROXY:
- Check the current IPv4 address, gateway, and DNS.
ip -4 addr ip route resolvectl dns - Reserve a fixed IP for the proxy server in the router settings, or configure the current IPv4 address, subnet mask, gateway, and DNS as static in Linux.
- If the server uses NetworkManager, you can configure a static IP as follows.
nmcli connection show sudo nmcli connection modify "connection-name" ipv4.addresses 192.168.152.128/24 ipv4.gateway 192.168.152.1 ipv4.dns "223.5.5.5 114.114.114.114" ipv4.method manual sudo nmcli connection up "connection-name" - Check the server IPv4 address again to confirm that it is fixed.
ip -4 addr
If the proxy server IP changes, update the pool address configured on every affected miner.
Network requirement
The proxy server and miners must be on the same LAN, with their Ethernet cables connected to the primary router.
Allow the proxy ports
Keep the Linux server firewall enabled. Allow only the proxy ports actually used by your miners; do not disable the entire firewall.
For systems using ufw:
sudo ufw allow 1111/tcp
sudo ufw allow 2222/tcp
sudo ufw allow 228/tcp
sudo ufw allow 3367/tcp
sudo ufw allow 2233/tcp
sudo ufw allow 4444/tcp
sudo ufw allow 7777/tcp
sudo ufw reload
sudo ufw status
For systems using firewalld:
sudo firewall-cmd --permanent --add-port=1111/tcp
sudo firewall-cmd --permanent --add-port=2222/tcp
sudo firewall-cmd --permanent --add-port=228/tcp
sudo firewall-cmd --permanent --add-port=3367/tcp
sudo firewall-cmd --permanent --add-port=2233/tcp
sudo firewall-cmd --permanent --add-port=4444/tcp
sudo firewall-cmd --permanent --add-port=7777/tcp
sudo firewall-cmd --reload
sudo firewall-cmd --list-ports
Start OKPROXY at boot
Use systemd to start OKPROXY automatically when the server starts.
- Create
okproxy.service.sudo nano /etc/systemd/system/okproxy.service - Add the following content and save the file.
[Unit] Description=OKPROXY encrypted proxy After=network-online.target Wants=network-online.target [Service] WorkingDirectory=/opt/okproxy ExecStart=/opt/okproxy/okproxy Restart=always RestartSec=5 [Install] WantedBy=multi-user.target - Enable and start the service.
sudo systemctl daemon-reload sudo systemctl enable --now okproxy - Check the service status.
sudo systemctl status okproxy - To view the service log, run:
journalctl -u okproxy -f