kk Blog —— 通用基础


date [-d @int|str] [+%s|"+%F %T"]
netstat -ltunp
sar -n DEV 1

ubuntu 编译strongswan

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
lsb_release -a

wget https://download2.strongswan.org/old/5.x/strongswan-5.7.2.tar.gz

sudo apt-get install -y build-essential libpcre3-dev libssl-dev libprotobuf-dev libsqlite3-dev libreadline-dev
sudo apt-get install -y libgmp-dev
sudo apt-get install -y libldap-dev
sudo apt-get install -y libcurl4-openssl-dev 
sudo apt-get install -y libldns-dev
sudo apt-get install -y libunbound-dev
sudo apt-get install -y  pkg-config
sudo apt-get install -y  libsoup2.4-dev 
sudo apt-get install -y libsystemd-dev
sudo apt-get install -y libtspi-dev 
sudo apt-get install libjson-c-dev 
sudo apt-get install libneo27-dev 
sudo apt-get install libneon27-gnutls-dev 
sudo apt-get install -y libpam-dev

./configure --disable-tss-tss --enable-eap-identity --enable-eap-md5 --enable-eap-mschapv2 --enable-eap-tls --enable-eap-ttls --enable-eap-peap --enable-eap-tnc --enable-eap-dynamic --enable-eap-radius --enable-xauth-eap --enable-xauth-pam --enable-dhcp --enable-openssl --enable-addrblock --enable-unity --enable-certexpire --enable-radattr --enable-tools --enable-openssl --disable-gmp --enable-kernel-libipsec
make -j4
make install

vim /usr/local/etc/swanctl/swanctl.conf 

ipsec stop
ipsec start
ipsec statusall

swanctl --load-all
tail -f /var/log/syslog