📄 spi1.sh
字号:
#!/bin/shTZ=GMT export TZipsec spi --clearipsec eroute --clear# 0x12345678@192.1.2.45 enckey1=0x43434545464649494a4a4c4c4f4f51515252545457575840authkey1=0x65876587658765876587658765876587ipsec spi --af inet --edst 192.1.2.45 --spi 0x12345678 --proto esp --src 192.1.2.23 --esp 3des-md5-96 --enckey $enckey1 --authkey $authkey1ipsec spi --af inet --edst 192.1.2.45 --spi 0x12345678 --proto tun --src 192.1.2.23 --dst 192.1.2.45 --ip4# 0xabcdabcd@192.0.1.1enckey2=0x434545464649494a4a4c4c4f4f5151525254545757584043authkey2=0x87658765876587658765876587658765ipsec spi --af inet --edst 192.0.1.1 --spi 0xabcdabcd --proto esp --src 192.1.2.23 --esp 3des-md5-96 --enckey $enckey2 --authkey $authkey2ipsec spi --af inet --edst 192.0.1.1 --spi 0xabcdabcd --proto tun --src 192.1.2.23 --dst 192.0.1.1 --ip4ipsec spigrp inet 192.1.2.45 0x12345678 tun inet 192.1.2.45 0x12345678 esp ipsec spigrp inet 192.0.1.1 0xabcdabcd esp inet 192.1.2.45 0x12345678 tun ipsec spigrp inet 192.0.1.1 0xabcdabcd tun inet 192.0.1.1 0xabcdabcd esp ipsec eroute --add --eraf inet --src 192.0.2.1/32 --dst 192.0.1.1/32 --said tun0xabcdabcd@192.0.1.1ipsec tncfg --attach --virtual ipsec0 --physical eth1ifconfig ipsec0 inet 192.1.2.23 netmask 0xffffff00 broadcast 192.1.2.255 uparp -s 192.1.2.45 10:00:00:64:64:45arp -s 192.1.2.254 10:00:00:64:64:45ipsec look# magic route commandroute add -host 192.0.1.1 gw 192.1.2.45 dev ipsec0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -