📄 west-console.txt
字号:
west:~# iptables -D INPUT -s 192.1.2.23/32 -d 0/0 -j DROPiptables: Bad rule (does a matching rule exist in that chain?)west:~# iptables -D OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROPiptables: Bad rule (does a matching rule exist in that chain?)west:~# iptables -Fwest:~# ipsec eroutewest:~# echo donedonewest:~# TESTNAME=dpd-06west:~# source /testing/pluto/bin/westlocal.shwest:~# ipsec setup startipsec_setup: Starting Openswan IPsec VERSIONwest:~# ipsec auto --add west-eastwest:~# ipsec whack --debug-dpd --debug-controlwest:~# : we can transmit in the clearwest:~# ping -q -c 8 -n 192.1.2.23PING 192.1.2.23 (192.1.2.23): 56 data bytes--- 192.1.2.23 ping statistics ---8 packets transmitted, 8 packets received, 0% packet lossround-trip min/avg/max = 3.1/4.5/9.26 mswest:~# : bring up the tunnelwest:~# ipsec auto --up west-east104 "west-east" #1: STATE_MAIN_I1: initiate003 "west-east" #1: received Vendor ID payload [Openswan 003 "west-east" #1: received Vendor ID payload [Dead Peer Detection]106 "west-east" #1: STATE_MAIN_I2: sent MI2, expecting MR2108 "west-east" #1: STATE_MAIN_I3: sent MI3, expecting MR3004 "west-east" #1: STATE_MAIN_I4: ISAKMP SA established {auth=OAKLEY_RSA_SIG cipher=oakley_3des_cbc_192 prf=oakley_md5 group=modp1536}117 "west-east" #2: STATE_QUICK_I1: initiate004 "west-east" #2: STATE_QUICK_I2: sent QI2, IPsec SA establishedwest:~# : use the tunnelwest:~# ping -q -c 8 -n 192.1.2.23PING 192.1.2.23 (192.1.2.23): 56 data bytes--- 192.1.2.23 ping statistics ---8 packets transmitted, 8 packets received, 0% packet lossround-trip min/avg/max = 3.1/4.5/9.26 mswest:~# : show the tunnelwest:~# ipsec eroute12 192.1.2.45/32 -> 192.1.2.23/32 => tun0x1002@192.1.2.23west:~# : Let R_U_THERE packets flowwest:~# sleep 10west:~# sleep 10west:~# : Create the blockwest:~# iptables -I INPUT -s 192.1.2.23/32 -d 0/0 -j DROPwest:~# iptables -I OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROPwest:~# sleep 10west:~# sleep 10west:~# iptables -D INPUT -s 192.1.2.23/32 -d 0/0 -j DROPwest:~# iptables -D OUTPUT -d 192.1.2.23/32 -s 0/0 -j DROPwest:~# sleep 10west:~# ipsec eroute0 192.1.2.45/32 -> 192.1.2.23/32 => %trapwest:~# echo donedonewest:~# west:~# ipsec setup stopIPSEC EVENT: KLIPS device ipsec0 shut down.ipsec_setup: Stopping Openswan IPsec...west:~# echo endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -