spi1.sh

来自「This a good VPN source」· Shell 代码 · 共 46 行

SH
46
字号
#!/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 $westip  --spi $outspi --proto esp --src $eastip --esp 3des --enckey $enckey ipsec spi --af inet --edst $westip  --spi $outspi --proto tun --src $eastip --dst $westip --ip4ipsec spigrp inet $westip $outspi tun inet $westip $outspi esp ipsec eroute --add --eraf inet --src $source --dst $dst --said tun$inspi@$westip# inbound SPIipsec spi --af inet --edst $eastip --spi $inspi  --proto esp --src $westip --esp 3des --enckey $enckey ipsec spi --af inet --edst $eastip --spi $inspi  --proto tun --src $westip --dst $eastip --ip4ipsec spigrp inet $eastip $inspi tun inet $eastip $inspi esp ipsec 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:45route add -net 192.0.1.0 netmask 255.255.255.0 gw 192.1.2.45 dev ipsec0ipsec look

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?