服务器 频道

网管经验谈:命令行下配置CIPE VPN

    1. 软件安装

    要设置 CIPE 服务器,可以通过网络来安装 cipe 软件包。下一步是把位于 /usr/share/doc/cipe-version/samples/ 的配置文件范例复制到 /etc/cipe/ 中(这里的 version 是安装在你的系统上的 CIPE 版本)。复制完毕后,你将需要编辑 /etc/cipe/options.cipcbx(x 是从0开始的递增数字,为那些想要在 CIPE 服务器上不止有一个 CIPE 连接的客户提供)文件来包括你的 LAN 子网地址和可公共选路的防火墙 IP 地址。以下是包括在RHEL 3.0的CIPE RPM 中的 options 文件范例。在这个例子中,它被重命名为 options.cipbcb0:

    # the peer''s IP address
   ptpaddr         6.5.4.3

    # our CIPE device''s IP address
    ipaddr          6.7.8.9

    # my UDP address. Note: if you set port 0 here, the system will pick
    # one and tell it to you via the ip-up script. Same holds for IP 0.0.0.0.
    me              bigred.inka.de:6789

    # ...and the UDP address we connect to. Of course no wildcards here.
    peer            blackforest.inka.de:6543

    # The static key. Keep this file secret!
    # The key is 128 bits in hexadecimal notation.
    key             xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 
    ptpaddr 是远程 LAN 的 CIPE 地址。ipaddr 是工作站的 CIPE IP 地址。me 地址是客户的可公共选路的 IP 地址,它通过互联网发送 UDP 分组。peer 是 CIPE 服务器的可公共选路的 IP 地址。注意,客户工作站的 IP 地址是 0.0.0.0,因为它使用动态连接。CIPE 客户将会处理到 CIPE 服务器的连接。key 字段(用 x 代表;你的钥匙应该是密钥)是共享静态钥匙。这个钥匙在两个对端上必须是相同的,否则连接就不能成立。这是客户工作站将会使用的被编辑过的 /etc/cipe/options.cipcb0:

    ptpaddr        10.0.1.2
    ipaddr         10.0.1.1
    me             0.0.0.0
    peer           LAN.EXAMPLE.COM:6969
    key            123456ourlittlesecret7890shhhh
    这是 CIPE 服务器的 /etc/cipe/options.cipcb0 文件:
    ptpaddr        10.0.1.1
    ipaddr         10.0.1.2
    me             LAN.EXAMPLE.COM:6969
    peer           0.0.0.0
    key            123456ourlittlesecret7890shhhh

0
相关文章