📄 spi1.sh
字号:
#!/bin/shTZ=GMT export TZipsec spi --clearipsec eroute --clearenckey=0x4043434545464649494a4a4c4c4f4f515152525454575758inspi=0x01000583outspi=$inspieastip=192.1.2.23westip=192.1.2.45source=192.0.2.0/24dst=192.0.1.0/24# 0123456789abcdef0123456789abcdef0123456789abcdef## 48 bytes = 192 bits## gateway is: 216.209.86.50# outbound SPIipsec spi --af inet --edst $eastip --spi $outspi --proto esp --src $westip --esp 3des --enckey $enckey ipsec spi --af inet --edst $eastip --spi $outspi --proto tun --src $westip --dst $eastip --ip4ipsec spigrp inet $eastip $outspi tun inet $eastip $outspi esp ipsec eroute --add --eraf inet --src $source --dst $dst --said tun$inspi@$eastip# inbound SPIipsec spi --af inet --edst $westip --spi $inspi --proto esp --src $eastip --esp 3des --enckey $enckey ipsec spi --af inet --edst $westip --spi $inspi --proto tun --src $eastip --dst $westip --ip4ipsec spigrp inet $westip $inspi tun inet $westip $inspi esp route add -net 192.0.1.0 netmask 255.255.255.0 gw 192.1.2.45 dev ipsec0ipsec tncfg --attach --virtual ipsec0 --physical eth1ifconfig ipsec0 inet 192.1.2.45 netmask 0xffffff00 broadcast 192.1.2.255 uparp -s 192.0.1.1 10:00:00:ab:cd:01arp -s 192.1.2.23 10:00:00:64:64:23arp -s 192.1.2.254 10:00:00:64:64:23ipsec lookipsec klipsdebug --all
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -