CentOS 7 is now using firewalld instead of iptables. To use iptables, here are the steps:
1. Disable firewalld
systemctrl disable firewalld
2. Stop firewalld
systemctrl stop firewalld
3. Install iptables-services
yum install iptables-services
4. Enable iptables
systemctl enable iptables
5. Start iptables
systemctl start iptables
6. Configure iptables as usual (/etc/sysconfig/iptables)
Tuesday, May 5, 2015
Monday, May 4, 2015
Add a private key to Mac OS X KeyChain
ssh-add -K ~/.ssh/id_rsa
ps. make sure the permission of id_rsa is 600
Wednesday, April 22, 2015
Completely remove nf_conntrack from kernel
1. Remove the following line, if it exists, in /etc/sysconfig/iptables-config
IPTABLES_MODULES="ip_conntrack_netbios_ns"
2. Stop iptables
iptables -F
3. Remove the related modules
modprobe -r xt_NOTRACK nf_conntrack_netbios_ns nf_conntrack_ipv4 xt_state
modprobe -r iptable_nat ipt_MASQUERADE nf_nat nf_defrag_ipv4
modprobe -r nf_conntrack
IPTABLES_MODULES="ip_conntrack_netbios_ns"
2. Stop iptables
iptables -F
3. Remove the related modules
modprobe -r xt_NOTRACK nf_conntrack_netbios_ns nf_conntrack_ipv4 xt_state
modprobe -r iptable_nat ipt_MASQUERADE nf_nat nf_defrag_ipv4
modprobe -r nf_conntrack
Wednesday, February 25, 2015
Solution for VPN client not working after upgraded to Mac 10.10 Yosemite
Source: http://apple.stackexchange.com/questions/151345/vpn-client-is-not-working-after-yosemite-update-enforce-firewall-policy-fail
Solution: put computer into kext developer mode (-> 10.9 behavior)
sudo nvram boot-args="kext-dev-mode=1"
To change back to 10.10 behavior (VPN client will not work)
sudo nvram -d boot-args
After the change, you need to reboot the computer
Solution: put computer into kext developer mode (-> 10.9 behavior)
sudo nvram boot-args="kext-dev-mode=1"
To change back to 10.10 behavior (VPN client will not work)
sudo nvram -d boot-args
After the change, you need to reboot the computer
Friday, January 16, 2015
rpath
Reference: http://ftp.gnu.org/pub/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html
Add directory to the runtime library search path, for shared object.
Example: Add runtime search path /tmp/igetui
gcc -Wl,-rpath,/tmp/igetui/ $(PLATFORM) $(DEBUG) -lpthread -ldl
OR add it to LD_LIBRARY_PATH
ex.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/igetui
OR add it /etc/ld.so.conf and run ldconfig
Add directory to the runtime library search path, for shared object.
Example: Add runtime search path /tmp/igetui
gcc -Wl,-rpath,/tmp/igetui/ $(PLATFORM) $(DEBUG) -lpthread -ldl
OR add it to LD_LIBRARY_PATH
ex.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/igetui
OR add it /etc/ld.so.conf and run ldconfig
Wednesday, November 12, 2014
Install Parallels Tools on CentOS for share folders
Source: http://tp69.wordpress.com/2012/10/03/parallels-tools-centos-server/
Issue: CentOS doesn't automatically mount it by default.
Solution: Mount it manually. Make sure your network connection is good in advance.
mount -r -t iso9660 /dev/sr0 /mnt/
cd /mnt
./install
Once done, restart the CentOS and the share folders will be automatically mounted on /media/psf
Issue: CentOS doesn't automatically mount it by default.
Solution: Mount it manually. Make sure your network connection is good in advance.
mount -r -t iso9660 /dev/sr0 /mnt/
cd /mnt
./install
Once done, restart the CentOS and the share folders will be automatically mounted on /media/psf
Thursday, November 6, 2014
Subscribe to:
Posts (Atom)
Check clients which connect to Mac OS X Wi-Fi Internet Sharing
arp -i bridge100 -a bridge100 may be different on your Mac OSX
-
1. Create an account on TestFlight ( http://testflightapp.com ) and with "Developer" option checked. 2. Log in to the TestFlight ...
-
[轉載] [Javascript] Encrypt your private blog post from the article of Kaie's Blog 今日在PPT上的Blog版逛到版友weijr所提到的一篇好文章,可以用來針對Blog中某一段文字給予加密,變成...
-
For Mac OS: Use lipo. Ex. lipo -info staticLibrary.a For Linux OS: Use file Ex. file staticLibrary.c