Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Cannot establish socks5 connection via dante

    Scheduled Pinned Locked Moved Routing and Multi WAN
    socks5 pfsensesocks5dantewireguard
    3 Posts 3 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      scuritel
      last edited by

      I need to send WireGuard handshake under Socks5 as my country is blocking simple WireGuard handshake. So I installed dante, configured it, opened port. But I have no idea why I can't use socks5.

      /usr/local/etc/sockd.conf

      logoutput: /var/log/sockd.log
      debug: 1
      
      user.privileged: root
      user.unprivileged: nobody
      
      internal: 0.0.0.0 port = PORT
      external: vtnet0
      
      # socks-rules determine what is proxied through the external interface.
      socksmethod: username
      
      # client-rules determine who can connect to the internal interface.
      clientmethod: none
      
      
      #permit clients inbound to the proxy
      client pass {
              from: 0.0.0.0/0 to: 0.0.0.0/0
              log: error #connect disconnect
      }
      
      socks pass {
              from: 0.0.0.0/0 to: 0.0.0.0/0
              log: error connect disconnect
      }
      

      curl -v -x socks5://user:pass@ip:PORT-L ifconfig.co

      *   Trying ip:PORT...
      * SOCKS5 connect to IPv4 localip:80 (locally resolved)
      * connection to proxy closed
      * Closing connection 0
      curl: (97) connection to proxy closed
      

      /var/log/sockd.log (dropping messages)

      Sep 27 03:18:19 (1695773899.720920) sockd[50492]: debug: accesscheck(): authentication matched
      Sep 27 03:18:19 (1695773899.721008) sockd[50492]: debug: run_negotiate(): recv_clientrequest() from client myip returned 2, errno is 0 (no error)
      Sep 27 03:18:19 (1695773899.776496) sockd[50492]: debug: recv_clientrequest(): fd 11, client myip, state->complete: 0, read so far: 26
      Sep 27 03:18:19 (1695773899.776608) sockd[50492]: debug: run_negotiate(): recv_clientrequest() from client myip returned 3, errno is 0 (no error)
      Sep 27 03:18:19 (1695773899.776639) sockd[50492]: debug: send_negotiate(): no shmem to unuse/clear
      Sep 27 03:18:19 (1695773899.776749) sockd[50492]: debug: send_negotiate(): client myip finished negotiate phase for command udpassociate using proxyprotocol socks_v5
      Sep 27 03:18:19 (1695773899.776787) sockd[50492]: debug: sendmsgn(): sendmsg() of 23272 bytes on fd 7 failed on try #0 (Message too long).  Giving up on this one
      Sep 27 03:18:19 (1695773899.776830) sockd[50492]: debug: send_negotiate(): sending client to mother failed: Message too long
      Sep 27 03:18:19 (1695773899.776858) sockd[50492]: warning: new client from myip dropped: no resources
      

      So what do I need to do?

      1 Reply Last reply Reply Quote 0
      • R
        relalis
        last edited by

        I experienced this issue on FreeBSD 14.1 and figured out that increasing net.local.dgram.maxdgram to 65536 fixes it.

        Hopefully this helps someone else trying to figure it out.

        1 Reply Last reply Reply Quote 0
        • S
          sparkman123
          last edited by

          Couldn't get dante to work until I found this. For those of you sportsfans keeping score at home, this is still valid/needed for pfSense version 2.7.2-CE and dante-1.4.3_2 circa 2/2025.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.