我在使用 iptables 和 PPTP VPN 时遇到问题,我已经阅读了相关主题和在线内容,但仍然无法正常工作!我正在尝试在我们本地网络的 ubuntu 服务器上设置 PPTP,以强制客户端必须通过 VPN 登录才能访问互联网。ubuntu 服务器直接连接到互联网。
在我的 rc.local 我有以下内容要转发和接受 gre
# PPTP IP forwarding
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A INPUT -p gre -j ACCEPT
sudo iptables -A OUTPUT -p gre -j ACCEPT
Run Code Online (Sandbox Code Playgroud)
这显示在我的 iptables 列表中,所以我知道它在那里。
我在服务器上使用 CSF 作为我的防火墙,如果禁用它,我可以连接到 VPN 并通过它浏览互联网,如果启用 CSF,我要么“被通信设备断开连接”,要么我可以连接但无法访问互联网通过 VPN。
这也有一个奇怪的问题,它似乎时不时地通过防火墙工作!
我打开了以下端口:
TCP_IN = ...47,53,80,92,110,143,443,465,587,993,995,1723,7777..
TCP_OUT = ...47,53,80,92,110,113,443,1723,25565,7777...
UDP_IN = 20,21,47,53,1723,27015,27025
UDP_OUT = 20,21,47,53,113,123,1723,27015, 27025
Run Code Online (Sandbox Code Playgroud)
你对如何解决这个问题有什么建议吗?您需要更多信息吗?
非常感谢您的时间,
根据要求提供额外信息:
iptables -nvL
Chain INPUT (policy DROP …Run Code Online (Sandbox Code Playgroud) 这是一个很难解释的问题,当使用 bash shell 连接到我的一台服务器时,在任何用户下,换行符都被破坏并且有各种各样的问题。其中一次我在下面的屏幕截图中详细说明:



我遇到的其他问题包括 nano 对我所在的行和/或字母感到非常困惑,如在 nano 中键入相同的消息所示:

这些问题仅在我之前提到的连接到运行 CentOs 的服务器时才会出现。你知道为什么会发生这种情况以及我能做些什么来解决它吗?在其他服务器上,消息工作正常!

谢谢你的时间,
请求命令的输出:
无法正常工作的服务器:

工作服务器:

它可能是非工作服务器上的自定义提示吗?在 .bashrc 中
PS1='\e[1;32m\u@\h\e[m:\e[1;34m\w\e[m$ '
Run Code Online (Sandbox Code Playgroud)
对此进行评论似乎可以解决问题。
谷歌表示,如果不遵守这些规则,可能会出现换行错误
use the \[ escape to begin a sequence of non-printing characters,
and the \] escape to signal the end of such a sequence
Run Code Online (Sandbox Code Playgroud)
我不确定这适合我的提示吗?
我刚刚更新到 Apache 2.4 并且遇到了大量现在丢失的模块,大概它们已被默认设置为禁用。
我一直在格式错误,Invalid command 'NAME', perhaps misspelled or defined by a module not included in the server configuration然后谷歌搜索提供的内容并包括模块。
然而,下面的一个让我难倒,我错过了什么?
Stopping httpd: [FAILED]
Starting httpd: [Mon May 07 14:42:22.523264 2012] [core:warn] [pid 30648:tid 3082909440]
AH00117: Ignoring deprecated use of DefaultType in line 81 of /etc/httpd/conf/httpd.conf.
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/ips.conf:6
AH00526: Syntax error on line 27 of /etc/httpd/conf/extra/httpd-deflate.conf:
Invalid command 'Header', perhaps misspelled or defined by a module …Run Code Online (Sandbox Code Playgroud)