ubuntu clash 配合smartdns

下载安装clash

下载安装smartdns

github 下载地址

配置

配置smartdns

  1. 设置smartdns配置端口,修改为没有占用的端口号,其他的都不用修改,官方推荐默认参数最佳!
    编辑vim /etc/smartdns/smartdns.conf
bash 复制代码
server-name smartdns
bind [::]:553 # 填写一个没有占用的端口号
  1. 启动
bash 复制代码
# 启动
sudo systemctl start smartdns
# 查看状态
sudo systemctl status smartdns
  1. 检查端口是否开启服务
shell 复制代码
ss -tunl | grep 553 

配置clash

修改部分:nameserver和fallback都填smartdns的服务端口. 其他的dns服务器不用添加。

在clash的yaml配置文件中:

yaml 复制代码
nameserver:
	127.0.0.1:553
fallback:
	127.0.0.1:553
相关推荐
蜡台1 天前
Python包管理工具pip完全指南-----2
linux·windows·python
^—app5668661 天前
游戏运存小启动不起来临时解决方法
运维·服务器
Ujimatsu1 天前
虚拟机安装Debian 13.x及其常用软件(2026.4)
linux·运维·ubuntu
千百元1 天前
zookeeper启不来了
linux·zookeeper·debian
志栋智能1 天前
超自动化安全:构建智能安全运营的核心引擎
大数据·运维·服务器·数据库·安全·自动化·产品运营
AnalogElectronic1 天前
linux 测试网络和端口是否连通的命令详解
linux·网络·php
Edward111111111 天前
4月28日防火墙问题
linux·运维·服务器
拾贰_C1 天前
【Agent | openai | Streaming | 】流式输出Streaming
ubuntu·面试·prompt
想学后端的前端工程师1 天前
【补充内外网突然不通的情况】
运维·服务器
面汤放盐1 天前
何时使用以及何时不应使用微服务:没有银弹
java·运维·云计算