{"id":1103,"date":"2025-06-11T01:00:01","date_gmt":"2025-06-10T17:00:01","guid":{"rendered":"https:\/\/virtualcardx.com\/?p=1103"},"modified":"2025-07-20T22:36:12","modified_gmt":"2025-07-20T14:36:12","slug":"debian-%e4%b8%8b%e9%85%8d%e7%bd%ae-socks5-%e4%bb%a3%e7%90%86%e6%9c%8d%e5%8a%a1%e7%ab%af%e8%bd%af%e4%bb%b6-dante","status":"publish","type":"post","link":"https:\/\/virtualcardx.com\/en\/2025\/06\/11\/debian-\u4e0b\u914d\u7f6e-socks5-\u4ee3\u7406\u670d\u52a1\u7aef\u8f6f\u4ef6-dante\/","title":{"rendered":"Configuring Socks5 proxy server software dante under Debian"},"content":{"rendered":"<p>The Socks5 proxy has a high degree of utility and security in network access. This article describes in detail how to configure the Socks5 proxy server using the dante software on a Debian system.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"683\" data-src=\"https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/06\/dante-1024x683.png\" alt=\"\" class=\"wp-image-1106 lazyload\" title=\"\" data-srcset=\"https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/06\/dante-1024x683.png 1024w, https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/06\/dante-300x200.png 300w, https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/06\/dante-768x512.png 768w, https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/06\/dante-18x12.png 18w, https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/06\/dante.png 1200w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/683;\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">I. Installing the dante server<\/h2>\n\n\n\n<p>First update the system package index and upgrade the installed software:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update\napt upgrade<\/code><\/pre>\n\n\n\n<p>Next, install the dante-server package:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install dante-server<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring the dante service<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Backup and create a new configuration file<\/h3>\n\n\n\n<p>To avoid service unavailability due to configuration errors, backup the original configuration file first:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/etc\/danted.conf \/etc\/danted.conf_orig\nrm \/etc\/danted.conf<\/code><\/pre>\n\n\n\n<p>Use the nano editor to create a new configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/danted.conf<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Configuration file contents<\/h3>\n\n\n\n<p>Enter the following in the file that opens, taking care to replace eth0 with the actual NIC name of the server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>logoutput: syslog\nuser.privileged: root\nuser.unprivileged: nobody\n\nNetwork interfaces and ports that # listens on\ninternal: 0.0.0.0 port=1080\n\n# proxy network interface or address\nexternal: eth0\n\n# proxy authentication method\nsocksmethod: username\n\n# Client connection rules\nclientmethod: none\n\nclient pass {\n    from: 0.0.0.0\/0 to: 0.0.0.0\/0\n}\n\nsocks pass {\n    from: 0.0.0.0\/0 to: 0.0.0.0\/0\n}\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. Adding authenticated users<\/h3>\n\n\n\n<p>Create a dedicated user for the proxy service and set a password:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>useradd -r -s \/bin\/false proxy_user\npasswd proxy_user<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. Restricting access to specific IPs (optional)<\/h3>\n\n\n\n<p>If you need to allow only certain IPs to connect to the proxy, you can modify the client pass rule in the configuration file to replace the<code>xxx.111.xxx.222<\/code>Replace with the IP address of the allowed connection:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>client pass {\n    from: xxx.111.xxx.222\/0 to: 0.0.0.0\/0\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">III. Configuring Firewall Rules<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Using iptables<\/h3>\n\n\n\n<p>Allow incoming and outgoing traffic on port 1080 of the TCP protocol:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>iptables -I INPUT -p tcp --dport 1080 -j ACCEPT\niptables -I OUTPUT -p tcp --sport 1080 -j ACCEPT\n\n# Save rule\nservice iptables save<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Use of ufw<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow 1080<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">IV. Restarting and verifying services<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Restart the dante service<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart danted.service<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Viewing the status of services<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status danted.service\n<\/code><\/pre>\n\n\n\n<p>Normally it will show that the service is actively running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u25cf danted.service - SOCKS (v4 and v5) proxy daemon (danted)\n     Loaded: loaded (\/lib\/systemd\/system\/danted.service; enabled; preset: enabled)\n     Active: active (running)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">V. Client connection test<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Testing with curl<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -v -x socks5:\/\/proxy_user:password@xxx.123.xxx.123:1080 http:\/\/google.com<\/code><\/pre>\n\n\n\n<p>If the connection is successful, something similar to the following is displayed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>* Trying xxx.123.xxx.123:1080...\n* Connected to xxx.123.xxx.123 (xxx.123.xxx.123) port 1080 (#0)\n* SOCKS5 connect to IPv4 64.233.165.106:80 (locally resolved)\n* SOCKS5 request granted.<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Browser configuration<\/h3>\n\n\n\n<p>Take Firefox as an example, go to \"Options\"-&gt;\"Network Settings\", select \"Manually Configure Proxy\", fill in the server IP in \"SOCKS Host\", and select \"SOCKS5\" protocol in \"Port 1080\". In \"SOCKS Host\", fill in the server IP, port 1080, select \"SOCKS5\" protocol, and check \"Use the same proxy for all protocols\".<\/p>\n\n\n\n<p>With the above steps, you can successfully configure the dante Socks5 proxy server on your Debian system. In practice, you can further adjust the access rules and security settings according to your needs.<\/p>","protected":false},"excerpt":{"rendered":"<p>The Socks5 proxy has a high level of web access ... <\/p>\n<p class=\"read-more-container\"><a title=\"Configuring Socks5 proxy server software dante under Debian\" class=\"read-more button\" href=\"https:\/\/virtualcardx.com\/en\/2025\/06\/11\/debian-\u4e0b\u914d\u7f6e-socks5-\u4ee3\u7406\u670d\u52a1\u7aef\u8f6f\u4ef6-dante\/#more-1103\" aria-label=\"Read more about Configuring Socks5 proxy server software dante under Debian\">Read more<\/a><\/p>","protected":false},"author":1,"featured_media":1105,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1103","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology-share","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/1103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/comments?post=1103"}],"version-history":[{"count":0,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/1103\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/media\/1105"}],"wp:attachment":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/media?parent=1103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/categories?post=1103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/tags?post=1103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}