Setup guide

SOCKS Proxy Setup for Linux

Complete guide to configuring SOCKS proxy on Linux using Terminal.

← Back to Support Documentation

📋 Before You Begin

Ensure you have your username and SSH password ready. You’ll need your SSH server hostname (provided via email when you requested SOCKS access), username, and password to connect to our secure SOCKS proxy servers.

Important: All SOCKS proxy servers are under the cotse.net domain. The codamail.com domain is exclusively for email services. SOCKS access must be requested separately from your email account.

📦 Step 1: SSH Client Installation

Most Unix/Linux installations contain SSH by default. If not installed, use your distribution’s package manager:

  • Red Hat / Fedora / CentOS: sudo dnf install openssh-clients
  • Ubuntu / Debian: sudo apt update && sudo apt install openssh-client
  • openSUSE: sudo zypper install openssh
  • Arch Linux: sudo pacman -S openssh

Accessing Terminal

  • Keyboard shortcut: Ctrl + Alt + T (most distributions).
  • Applications menu: Look for “Terminal”, “Console”, or “Command Line”.
  • Activities / Dash: Search for “terminal”.

🔐 Step 2: Create SOCKS Proxy Tunnel

Open a Terminal window and type the command below. Make sure to substitute your account name and the SSH server you were assigned:

ssh -L 5000:127.0.0.1:1080 youraccount@yourassignedsocksserver

SOCKS Configuration: This command creates a SOCKS proxy tunnel on port 5000, forwarding to port 1080 on the server. Unlike HTTP tunnels, SOCKS works at a lower network level.

🚀 Step 3: Establish SOCKS Connection

First Connection

  • Paste the command into Terminal and press Enter.
  • On first connection, you’ll see a host key verification prompt similar to:
    The authenticity of host 'sp1.cotse.net (67.159.26.71)' can't be established.
    DSA key fingerprint is 88:f6:bc:71:bf:6f:1f:be:85:a0:81:4d:ed:3c:d7:dc.
    Are you sure you want to continue connecting (yes/no)?
  • Type yes to accept the server key.
  • Enter your password when prompted (typing may not echo, just type and press Enter).
  • Important: Leave the Terminal window open. This maintains your SOCKS tunnel.

Connection Success: Once connected, you’ll see a shell prompt or the connection will appear to “hang”. This is normal and means your SOCKS tunnel is active.

🦊 Firefox Configuration (Recommended)

Configure Firefox SOCKS Proxy

  • Run Firefox.
  • Click menu (☰) → Settings.
  • Scroll to Network Settings and click Settings.
  • Select Manual proxy configuration.
  • Enter 127.0.0.1 and port 5000 in the SOCKS Host field only.
  • Select SOCKS v5.
  • Important: Every other field must be blank for SOCKS.
  • Click OK, then OK again.

Recommendation: We recommend Firefox with the NoScript and uBlock Origin addons for your best protection with a SOCKS proxy.

🌐 Other Browser Configuration

Chromium / Chrome Configuration

  • Launch Chrome/Chromium with SOCKS proxy settings:
    • google-chrome --proxy-server="socks5://127.0.0.1:5000"
    • chromium-browser --proxy-server="socks5://127.0.0.1:5000"
  • Alternatively, use system proxy settings through your desktop environment’s network configuration.

System-Wide Proxy (GNOME)

  • Settings → Network → Network Proxy.
  • Select Manual.
  • SOCKS Host: 127.0.0.1, Port: 5000.
  • Apply system-wide.

System-Wide Proxy (KDE)

  • System Settings → Network → Proxy.
  • Select Manually specify proxy settings.
  • SOCKS proxy: 127.0.0.1:5000.
  • Apply settings.

🐧 Linux-Specific Features

Background Connection Management

  • Background Process: Use nohup or screen:
    nohup ssh -L 5000:127.0.0.1:1080 youraccount@yourassignedsocksserver &
    screen -S socks_tunnel ssh -L 5000:127.0.0.1:1080 youraccount@yourassignedsocksserver
  • Systemd Service: Create a service file for automatic startup.
  • Cron Job: Automatic reconnection on system reboot.

SSH Configuration File

  • Create ~/.ssh/config for permanent settings:
    Host cotse-socks
        Hostname yourassignedsocksserver
        User youraccount
        LocalForward 5000 127.0.0.1:1080
        ServerAliveInterval 60
  • Then connect with: ssh cotse-socks.

Understanding SOCKS vs HTTP

  • SOCKS Proxy: Works at lower network level, supports more protocols.
  • Port 1080: Standard SOCKS port (vs HTTP ports 8888/8080/9999).
  • Application Support: Works with more applications beyond browsers.
  • SOCKS v5: Preferred version with authentication and UDP support.

Network Manager Integration

  • Some Linux distributions can integrate SOCKS proxies with NetworkManager.
  • Check for SOCKS proxy plugins in your distribution’s repository.
  • Consider GUI SSH managers like Remmina or PAC Manager for SOCKS tunnels.

🔧 Troubleshooting

Common Linux SOCKS proxy issues and solutions:

  • Permission Denied: Check SSH client is installed, verify credentials.
  • Connection Refused: Verify SOCKS server hostname is correct.
  • Host Key Verification Failed: Remove old key: ssh-keygen -R hostname.
  • Port Already in Use: Kill existing process: sudo netstat -tulpn | grep :5000.
  • Broken Pipe: Connection dropped, restart SSH command.
  • Browser Not Using Proxy: Verify SOCKS settings and restart browser.

Distribution-Specific Issues

  • SELinux (RHEL/CentOS): May block SSH tunneling. Check with sealert -a /var/log/audit/audit.log.
  • AppArmor (Ubuntu): SSH profile may restrict tunneling.
  • Firewall (UFW/iptables): Ensure local ports are not blocked.
  • Network Manager: May interfere with proxy settings.

Process Management

  • List SSH processes: ps aux | grep ssh.
  • Kill SOCKS tunnel: pkill -f "ssh -L".
  • Monitor connection: netstat -an | grep 5000.

📞 Need Help?

If you need additional assistance with SOCKS proxy setup on Linux or encounter any issues not covered in this guide, please contact our support team at helpdesk@codamail.com.

We’re here to help ensure your SOCKS proxy works perfectly and keeps your Linux system browsing secure and private.