V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
2232588429
V2EX  ›  问与答

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

  •  
  •   2232588429 · 2014-08-10 08:31:56 +08:00 · 4523 次点击
    这是一个创建于 3568 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在debian里配置PPTP,如果没有备份,里面的pptpd.conf配置错了该怎么重装呢?有没有快捷的办法?能不能直接卸载掉pptpd再装?
    9 条回复    2014-08-10 10:41:12 +08:00
    fangpeishi
        1
    fangpeishi  
       2014-08-10 08:37:02 +08:00
    aptitude purge
    2232588429
        2
    2232588429  
    OP
       2014-08-10 08:45:12 +08:00
    @fangpeishi 谢谢,这个命令后面加包的名字就行吧?
    jasontse
        3
    jasontse  
       2014-08-10 08:53:59 +08:00 via iPad
    apt-get remove --purge pptpd
    2232588429
        4
    2232588429  
    OP
       2014-08-10 09:04:15 +08:00
    @jasontse 请问怎么使用了aptitude purge这个命令后发现sysctl.conf和chap-secrets配置文件还是以前的?
    jasontse
        5
    jasontse  
       2014-08-10 09:08:34 +08:00 via iPad   ❤️ 2
    @2232588429
    sysctl.conf 是系统文件不属于 pptpd 软件包,chap-secrets 则是 pppd 软件包中的文件,pppd 是 pptpd 的依赖。如果要彻底卸载 pptpd 的一切依赖使用命令
    apt-get autoremove --purge pptpd
    Jarvanh
        6
    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
        7
    2232588429  
    OP
       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
        8
    jasontse  
       2014-08-10 10:28:00 +08:00 via iPad
    @2232588429 直接执行
    2232588429
        9
    2232588429  
    OP
       2014-08-10 10:41:12 +08:00
    @jasontse 汗,刚发现那个教程好像是centos环境的,我是debian系统应该不是这么弄吧?是不是最适合用一键安装包?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1042 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 22:43 · PVG 06:43 · LAX 15:43 · JFK 18:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.