大概是配置文件直接复制粘帖导致有看不见的奇怪字符串,老老实实修改好配置文件不留奇怪空格,就不报这个错了。配置文件使用uci解析的,pptpd的配置文件在/etc/config/pptpd文件中,内容如下,
config service 'pptpd'
option enabled '1'
option localip '192.168.0.1'
option remoteip '192.168.0.2-30'
option nat '1'
option internet '1'
#list dns '192.168.1.1'
#list dns '10.10.0.21'
option mppe '1'
config login
option enabled '1'
option username 'user2'
option password 'dfsaf'
option ipaddress '192.168.0.2'
/etc/init.d/pptpd restart
/etc/init.d/pptpd start
都可以开启pptpd服务器了
netstat -antp
查看1723端口有没有开,开了就是运行了。
关于sh out of range 可看https://forum.openwrt.org/t/default-config-file-for-pptpd-lacks-logwtmp-option/4795
######/etc/firewall.user###########
iptables -A forwarding_rule -i ppp+ -j ACCEPT ## luci-app-pptpd
iptables -A forwarding_rule -o ppp+ -j ACCEPT ## luci-app-pptpd
iptables -A output_rule -o ppp+ -j ACCEPT ## luci-app-pptpd
iptables -A input_wan_rule -p tcp --dport 1723 -j ACCEPT ## luci-app-pptpd
iptables -A input_wan_rule -p tcp --dport 47 -j ACCEPT ## luci-app-pptpd
iptables -A input_wan_rule -p gre -j ACCEPT ## luci-app-pptpd
iptables -A input_rule -i ppp+ -j ACCEPT ## luci-app-pptpd
————————————————
版权声明:本文为优快云博主「d9394952」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.youkuaiyun.com/d9394952/article/details/87868803
博客介绍了在OpenWRT系统中遇到由于配置文件复制粘贴导致的错误,通过检查并修正配置文件内容,成功启动了PPTPD服务。配置文件主要涉及pptpd的设置,包括启用服务、本地和远程IP地址、MPPE加密等选项。此外,还展示了如何检查1723端口是否开放以及更新iptables规则以允许PPTPD通信。
6188

被折叠的 条评论
为什么被折叠?



