在 debian 里配置 PPTP,里面的 pptpd.conf 如果配置错了该怎么重装呢?

2014-08-10 08:31:56 +08:00
 2232588429
在debian里配置PPTP,如果没有备份,里面的pptpd.conf配置错了该怎么重装呢?有没有快捷的办法?能不能直接卸载掉pptpd再装?
4531 次点击
所在节点    问与答
9 条回复
fangpeishi
2014-08-10 08:37:02 +08:00
aptitude purge
2232588429
2014-08-10 08:45:12 +08:00
@fangpeishi 谢谢,这个命令后面加包的名字就行吧?
jasontse
2014-08-10 08:53:59 +08:00
apt-get remove --purge pptpd
2232588429
2014-08-10 09:04:15 +08:00
@jasontse 请问怎么使用了aptitude purge这个命令后发现sysctl.conf和chap-secrets配置文件还是以前的?
jasontse
2014-08-10 09:08:34 +08:00
@2232588429
sysctl.conf 是系统文件不属于 pptpd 软件包,chap-secrets 则是 pppd 软件包中的文件,pppd 是 pptpd 的依赖。如果要彻底卸载 pptpd 的一切依赖使用命令
apt-get autoremove --purge pptpd
Jarvanh
2014-08-10 09:54:14 +08:00
@jasontse 谢谢。搞定

root@default:~# apt-get autoremove --purge pptpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
bcrelay* ppp* pptpd*
0 upgraded, 0 newly installed, 3 to remove and 15 not upgraded.
After this operation, 1503 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 33197 files and directories currently installed.)
Removing pptpd ...
Stopping PPTP: pptpd.
Purging configuration files for pptpd ...
insserv: warning: script 'K01amh-start' missing LSB tags and overrides
insserv: warning: script 'amh-start' missing LSB tags and overrides
Removing bcrelay ...
Removing ppp ...
Stopping all PPP connections...done.
Purging configuration files for ppp ...
insserv: warning: script 'K01amh-start' missing LSB tags and overrides
insserv: warning: script 'amh-start' missing LSB tags and overrides
Processing triggers for man-db ...


root@default:~# apt-get autoremove --purge pptpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package pptpd is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
2232588429
2014-08-10 10:01:51 +08:00
@jasontse 谢谢,另外想请教,添加转发规则这一步是需要新建一个空白文件写入规则还是直接在命令行输入iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to-source **.**.**.**呢?
jasontse
2014-08-10 10:28:00 +08:00
@2232588429 直接执行
2232588429
2014-08-10 10:41:12 +08:00
@jasontse 汗,刚发现那个教程好像是centos环境的,我是debian系统应该不是这么弄吧?是不是最适合用一键安装包?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/127015

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX