📄 nfmark-console.txt
字号:
Starting UML PATH/start.shspawn PATH singleLinux version XXXXOn node 0 totalpages: 8192Kernel command line:Calibrating delay loop... XXXX bogomipsDentry-cache hash table entries: NUMBERSInode-cache hash table entries: NUMBERSMount-cache hash table entries: NUMBERSBuffer-cache hash table entries: NUMBERSPage-cache hash table entries: NUMEBRSPOSIX conformance testing by UNIFIXLinux NET4.0 for Linux 2.4Based upon Swansea University Computer Society NET3.039Initializing RT netlink socketStarting kswapdVFS: Diskquotas version dquot_6.4.0 initializeddevfs: VERSION Richard Gooch (rgooch@atnf.csiro.au)devfs: boot_options Qpty: 256 Unix98 ptys configuredSLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).loop: loaded (max 8 devices)PPP generic driver version VERSIONUniversal TUN/TAP device driver VERSIONNET4: Linux TCP/IP 1.0 for NET4.0IP Protocols: ICMP, UDP, TCPIP: routing cache hash table of 512 buckets, 4KbytesTCP: Hash tables configured (established 2048 bind 2048)IPv4 over IPv4 tunneling driverGRE over IPv4 tunneling driverNET4: Unix domain sockets 1.0/SMP for Linux NET4.0.Mounted devfs on /devINIT: version 2.78 bootingActivating swap...Calculating module dependanciesdone.Loading modules: LISTChecking all file systems...Parallelizing fsck version 1.18 (11-Nov-1999)Setting kernel variables.Mounting local filesystems.../dev/shm on /tmp type tmpfs (rw)/dev/shm on /var/run type tmpfs (rw)devpts on /dev/pts type devpts (rw,mode=0622)none on /usr/share type hostfs (ro)Enabling packet forwarding: done.Configuring network interfaces: done.Cleaning: /tmp /var/lock /var/run.Initializing random number generator... done.Recovering nvi editor sessions... done.Give root password for maintenance(or type Control-D for normal startup): west:~# klogd -c 4 -x -f /tmp/klog.logwest:~# TZ=GMT export TZwest:~# ipsec spi --clearwest:~# ipsec eroute --clearwest:~# enckey1=0x4043434545464649494a4a4c4c4f4f515152525454575758west:~# enckey2=0x5464649494a4a4c4c4f4f515152525454575758404343454west:~# authkey1=0x87658765876587658765876587658765west:~# authkey2=0x65876587658765876587658765876587west:~# : set up SPI 1west:~# sa1=`ipsec spi --af inet --edst 192.1.2.45 --spi 0x88447755 --proto esp --src 192.1.2.23 --esp 3des-md5-96 --enckey $enckey1 --authkey $authkey1 --saref | cut -d '=' -f2`west:~# echo SA1 $sa1SA1 2west:~# sa2=`ipsec spi --af inet --edst 192.1.2.45 --spi 0x88447755 --proto tun --src 192.1.2.23 --dst 192.1.2.45 --ip4 --saref | cut -d '=' -f2`west:~# echo SA2 $sa2SA2 3west:~# ipsec spigrp inet 192.1.2.45 0x88447755 tun inet 192.1.2.45 0x88447755 esp west:~# : set up SPI 2west:~# sa3=`ipsec spi --af inet --edst 192.1.2.45 --spi 0x12345678 --proto esp --src 192.1.2.23 --esp 3des-md5-96 --enckey $enckey2 --authkey $authkey2 --saref | cut -d '=' -f2`west:~# echo SA3 $sa3SA3 6west:~# sa4=`ipsec spi --af inet --edst 192.1.2.45 --spi 0x12345678 --proto tun --src 192.1.2.23 --dst 192.1.2.45 --ip4 --saref | cut -d '=' -f2`west:~# echo SA4 $sa4SA4 7west:~# ipsec spigrp inet 192.1.2.45 0x12345678 tun inet 192.1.2.45 0x12345678 esp west:~# ipsec lookwest NOWesp0x12345678@192.1.2.45 ESP_3DES_HMAC_MD5: dir=in src=192.1.2.23 iv_bits=64bits iv=0xDEADF00DDEADF00D alen=128 aklen=128 eklen=192 life(c,s,h)= refcount=4 ref=6esp0x88447755@192.1.2.45 ESP_3DES_HMAC_MD5: dir=in src=192.1.2.23 iv_bits=64bits iv=0xDEADF00DDEADF00D alen=128 aklen=128 eklen=192 life(c,s,h)= refcount=4 ref=2tun0x12345678@192.1.2.45 IPIP: dir=in src=192.1.2.23 life(c,s,h)= refcount=4 ref=7tun0x88447755@192.1.2.45 IPIP: dir=in src=192.1.2.23 life(c,s,h)= refcount=4 ref=3Destination Gateway Genmask Flags MSS Window irtt Ifacewest:~# sa1=$(printf "0x%08x" $(expr $sa1 '*' 65536))west:~# sa2=$(printf "0x%08x" $(expr $sa2 '*' 65536))west:~# sa3=$(printf "0x%08x" $(expr $sa3 '*' 65536))west:~# sa4=$(printf "0x%08x" $(expr $sa4 '*' 65536))west:~# echo SA1 $sa1SA1 0x00020000west:~# echo SA2 $sa2SA2 0x00030000west:~# echo SA3 $sa3SA3 0x00060000west:~# echo SA4 $sa4SA4 0x00070000west:~# : now setup of the nfmark based switchingwest:~# mkdir -p /etc/iproute2west:~# echo '11 sa1' >>/etc/iproute2/rt_tableswest:~# echo '12 sa2' >>/etc/iproute2/rt_tableswest:~# echo '13 sa3' >>/etc/iproute2/rt_tableswest:~# echo '14 sa4' >>/etc/iproute2/rt_tableswest:~# ip rule add fwmark $sa2 table sa2west:~# ip route add default via 192.1.2.254 dev eth1 table sa2west:~# ipsec tncfg --attach --virtual ipsec0 --physical eth1west:~# ifconfig ipsec0 inet 192.1.2.45 netmask 0xffffff00 broadcast 192.1.2.255 upwest:~# arp -s 192.1.2.23 10:00:00:64:64:23west:~# arp -s 192.1.2.254 10:00:00:64:64:fewest:~# arp -s 192.0.1.1 10:00:00:32:32:01west:~# arp -s 192.9.2.254 10:00:00:99:99:fewest:~# kill `cat /var/run/klogd.pid`; cat /tmp/klog.logklogd 1.3-3#33.1, log source = /proc/kmsg started.west:~# haltINIT: Switching to runlevel: 0INIT: Sending processes the TERM signalwest:~# INIT: Sending processes the KILL signalStopping domain name service: named.Stopping internet superserver: inetd.Stopping portmap daemon: portmap.ipsec_setup: Stopping FreeS/WAN IPsec...ipsec_setup: stop ordered, but IPsec does not appear to be running!ipsec_setup: doing cleanup anyway...IPSEC EVENT: KLIPS device ipsec0 shut down.Stopping system log daemon: klogd syslogd.Sending all processes the TERM signal... done.Sending all processes the KILL signal... done.Unmounting remote filesystems... done.Deactivating swap... done.Unmounting local filesystems... done.Power down.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -