linux下建立ipip隧道的脚本
2012-10-08 16:43
357 查看
linux下建立ipip隧道的脚本#!/bin/bashinet_ip="$1"ipip_rmt_ip="$2"ipip_num="$3"modprobe ipipiptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
ip tunnel add tun$ipip_num mode ipip remote $ipip_rmt_ip local $inet_ip ttl 64ip link set tun$ipip_num mtu 1480 upip address add 172.16.$ipip_num.1 brd 255.255.255.255 peer 172.16.$ipip_num.2 dev tun$ipip_numiptables -t mangle -o tun$ipip_num --insert FORWARD 1 -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:65495 -j TCPMSS --clamp-mss-to-pmtu
#add tunipip.sh 118.122.117.134 76.74.154.100 100 >> $logipip.sh 118.122.117.134 180.92.185.70 101 >> $logipip.sh 118.122.117.134 66.55.88.48 105 >> $logipip.sh 118.122.117.134 103.246.244.174 104 >> $logipip.sh 118.122.117.134 180.92.185.67 106 >> $log
ipip.sh 182.151.212.242 50.97.237.130 102 >> $logipip.sh 182.151.212.242 216.12.198.98 103 >> $log
ip tunnel add tun$ipip_num mode ipip remote $ipip_rmt_ip local $inet_ip ttl 64ip link set tun$ipip_num mtu 1480 upip address add 172.16.$ipip_num.1 brd 255.255.255.255 peer 172.16.$ipip_num.2 dev tun$ipip_numiptables -t mangle -o tun$ipip_num --insert FORWARD 1 -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:65495 -j TCPMSS --clamp-mss-to-pmtu
#add tunipip.sh 118.122.117.134 76.74.154.100 100 >> $logipip.sh 118.122.117.134 180.92.185.70 101 >> $logipip.sh 118.122.117.134 66.55.88.48 105 >> $logipip.sh 118.122.117.134 103.246.244.174 104 >> $logipip.sh 118.122.117.134 180.92.185.67 106 >> $log
ipip.sh 182.151.212.242 50.97.237.130 102 >> $logipip.sh 182.151.212.242 216.12.198.98 103 >> $log
相关文章推荐
- 两台linux建立GRE隧道
- Shell脚本运行hive语句 | hive以日期建立分区表 | linux schedule程序 | sed替换文件字符串 | shell推断hdfs文件文件夹是否存在
- Linux 批量建立信任关系,实现ssh无密码登陆的脚本
- Linux 批量建立信任关系,实现ssh无password登陆的脚本
- Linux运维笔记-课后作业-非交互式建立swap分区(脚本执行)
- windows下建立文件的换行符^M导致linux下的shell脚本运行错误的解决方案
- 101个脚本之建立linux回收站的脚本
- Linux环境下建立socks5代理脚本
- Linux系统vsftpd下建立虚拟用户的脚本实现
- 打造自己的专属Linux(二):使用脚本实现自动化建立小Linux与命令移植
- Linux 下建立 SSH 隧道做 Socket 代理
- linux下面用脚本批量建立用户
- linux下建立、删除多个用户的小脚本
- Linux 建立php脚本定时任务 和定时备份数据库
- linux系统下通过终端脚本建立视频会议
- 批量建立linux机器之间的ssh互信的自动化脚本
- linux主机与路由器建立隧道的方法
- LINUX用户建立秘钥认证实现SHELL脚本管理,分发,部署