linux Rad Hat 9-vyatta+公司环境配置
时间:2009-07-11 来源:linqm521
vyatta服务器配置 123.103.47.baf
在su模式下配置:
1)iptunnel add tunnel0 mode ipip remote 160.10.115.254 local 123.103.47.216 ----建立tunnel对等体
----对端IP地址 ----本地接口IP地址
2)ip link set tunnel0 up ----启动tunnel0口
3)ip addr add 10.10.10.2/24 dev tunnel0 ----设置本地tunnel0 IP地址为10.10.10.2/24
iptunnel del tunnel0 mode ipip remote 160.10.115.254 local 123 .103.47.216 ----删除该条配置命令
linux client Configuration 本机linux配置
pptp-linux-1.0.2.tar.gz有这个软件才能配置pptp client
1)vi /etc/ppp/chap-secrets 添加 lin * lin ----该用户名是pptp服务器所配置好的(lin:username * lin:password)
2)pptp 218.240.20.106 user lin ----IP地址为PPTP服务器地址、用户名必须和chap-secrets文件内名字相同
3)ip tunnel add tunnel0 mode ipip remote 123.103.47.216 local 160.10.115.254 ----简历tunnel对等体
4)ip link set tunnel up ----启动tunnel0口
5)ip add 10.10.10.1/24 dev tunnel0 ----设置本地tunnel0 IP地址为10.10.10.1/24(必选保证与对端tunnel地址在同一网段)
route add -net 123.0.0.0 netmask 255.0.0.0 gw 160.10.115.45 ----添加一条静态路由到123.0.0.0/8走160.10.115.45(160.10地址时pptp对端ip地址)(本实验不需要添加路由,如果不通可以手动指出方可)
route del -net 123.0.0.0 netmask 255.0.0.0 gw 160.10.115.45 ----删除一条静态路由