打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
EdgeRouter PPtP Server访问本地DNS服务 | @sskaje

UBNT EdgeRouter 自带了PPTP Server,典型的配置方法是

1
2
3
4
5
6
set vpn pptp remote-access authentication local-users username sskaje password PASSWORD
set vpn pptp remote-access authentication mode local
set vpn pptp remote-access client-ip-pool start 192.168.100.210
set vpn pptp remote-access client-ip-pool stop 192.168.100.219
set vpn pptp remote-access dns-servers server-1 8.8.8.8
set vpn pptp remote-access mtu 1492

官方参考guide: https://help.ubnt.com/hc/en-us/articles/205220840-EdgeMAX-PPTP-VPN-with-local-users-RADIUS

这个案例里,我的路由eth0是LAN口,eth0的IP是 192.168.100.1,这个配置下我的pptp客户端能正常访问到我的内网的机器。
但是如果我需要把DNS设成 192.168.100.1,DNS请求就会一直没响应。
路由端抓 UDP 53 的包,可以看到pptp客户端发出的dns请求,但是没有回包。
看了眼/etc/dnsmasq.conf:

1
2
3
4
log-facility=/var/log/dnsmasq.log
interface=eth0
interface=eth2
cache-size=10000

man dnsmasq

-i, –interface=
Listen only on the specified interface(s). Dnsmasq automatically adds the loopback (local) interface to the list of interfaces to use when the –interface option is used. If no –interface or –listen-address options
are given dnsmasq listens on all available interfaces except any given in –except-interface options. IP alias interfaces (eg “eth1:0”) cannot be used with –interface or –except-interface options, use –listen-
address instead. A simple wildcard, consisting of a trailing ‘*’, can be used in –interface and –except-interface options.

尝试了加一个 interface=pptp*,无效。
顺手先把dnsmasq的请求隔离到一个新的网段 192.168.101.0/24,服务端的local-ip设成 192.168.101.1,推送dns 192.168.101.1,再设置options ‘listen-address=192.168.101.1’,解决。
全部命令如下

1
2
3
4
5
6
7
8
9
set vpn pptp remote-access authentication local-users username sskaje password PASSWORD
set vpn pptp remote-access authentication mode local
set vpn pptp remote-access client-ip-pool start 192.168.101.210
set vpn pptp remote-access client-ip-pool stop 192.168.101.219
set vpn pptp remote-access dns-servers server-1 192.168.101.1
set vpn pptp remote-access local-ip 192.168.101.1
set vpn pptp remote-access mtu 1492
set service dns forwarding options listen-address=192.168.13.1
EdgeRouter PPtP Server访问本地DNS服务 by @sskaje: https://sskaje.me/2016/02/edgerouter-pptp-server-dns-service/

Incoming search terms:

Link to this post!
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
SSTP Remote Access Step-by-Step Guide: Deployment
ROS手册PPTP部分
BusyBox 應用 – udhcpc | Focus
在企业网中获取到非法IP应该怎样做?
自动获取IP
Linux下搭建一个支持IPv6的PPTP VPN
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服