|
见习武士

- 帖子
- 8
- 精华
- 0
- 积分
- 9
- 注册时间
- 2007-1-5
|
楼主
大 中
小 发表于 2007-3-5 16:20 只看该作者
CIPE连接两个局域网(VPN)-----广州北大青鸟五羊新城电脑培训
[attach]14544[/attach]
linux主机redhat
1、ifcfg-cipcb0 内容:
DEVICE=cipcb0
ONBOOT=yes
USERCTL=yes
2、options.cipcb0 内容:
# Surprise, this file allows comments (but only on a line by themselves)
# This is probably the minimal set of options that has to be set
# Without a "device" line, the device is picked dynamically
device cipcb0
# the peer's IP address
ptpaddr 192.168.1.1
# our CIPE device's IP address
ipaddr 192.168.0.28
# 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 61.177.190.1:9000
# ...and the UDP address we connect to. Of course no wildcards here.
peer 61.177.190.2:9000
# The static key. Keep this file secret!
# The key is 128 bits in hexadecimal notation.
key 3248fd20adf9c00ccf9ecc2393bbb3e4
3、ip-up 内容增加以下路由:
route add -host 192.168.1.1 dev cipcb0
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
linux主机rh9
1、ifcfg-cipcb0 内容:
DEVICE=cipcb0
ONBOOT=yes
USERCTL=yes
2、options.cipcb0 内容:
# Surprise, this file allows comments (but only on a line by themselves)
# This is probably the minimal set of options that has to be set
# Without a "device" line, the device is picked dynamically
device cipcb0
# the peer's IP address
ptpaddr 192.168.0.28
# our CIPE device's IP address
ipaddr 192.168.1.1
# 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 61.177.190.2:9000
# ...and the UDP address we connect to. Of course no wildcards here.
peer 61.177.190.1:9000
# The static key. Keep this file secret!
# The key is 128 bits in hexadecimal notation.
key 3248fd20adf9c00ccf9ecc2393bbb3e4
3、ip-up 内容增加以下路由:
route add -host 192.168.0.28 dev cipcb0
route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.28
分别开启数据转发功能,并且分别chmod 6000 options.cipcb0,否则cipcb0端口无法启动。最强的师资!最好的设备!我信赖:北大青鸟(五羊新城学校)网络工程师培训中心 咨询电话:87318662 传真:87601353 地址:广州市东山区达道路12号金达大厦三楼
|