bash: rsync: command not found

Posted: 29th July 2010 by admin in Linux How to

bash: rsync: command not found

fix by add –rsync-path=PATH

configure: error: C compiler cannot create executables
install SUNWarc from dvd for fix it

Edit ld.config on solaris 10

Posted: 28th July 2010 by admin in system

Edit Default Library Path on solaris 10
type “crle” for list Default Library Path
# crle

Configuration file [version 4]: /var/ld/ld.config
Default Library Path (ELF): /usr/local/lib:/lib:/usr/lib
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)

Command line:
crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib

type “crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib” to change Default Library Path
#crle -c /var/ld/ld.config -l /usr/local/lib:/lib:/usr/lib

Install and config Java on gentoo linux

Posted: 6th July 2010 by admin in Linux How to

Install JDK
# emerge virtual/jdk

Config JVM

# java-config –list-available-vms

# java-config –set-system-vm ???

enable php curl proxy

Posted: 2nd January 2010 by admin in php

curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_PROXY,”$host:$port”);

ubuntu build essential

Posted: 2nd January 2010 by admin in system

#apt-get install build-essential

snmptranslate

Posted: 26th June 2009 by admin in linux security, network

# snmptranslate -IR tcpPassiveOpens.0
TCP-MIB::tcpPassiveOpens.0

# snmptranslate -On TCP-MIB::tcpPassiveOpens.0
.1.3.6.1.2.1.6.6.0

# snmptranslate .1.3.6.1.2.1.6.6.0
TCP-MIB::tcpPassiveOpens.0

การเปิด timestamp จะทำให้ต้องเพิ่ม ‏ 12bytes ไว้ที่ TCP header ครับ

Linux

เปิด :

echo 1 >/proc/sys/net/ipv4/tcp_timestamps

ปิด :

echo 0 >/proc/sys/net/ipv4/tcp_timestamps

*BSD

เปิด :

sysctl -w TCPCTL_DO_RFC1323=true

ปิด :

sysctl -w TCPCTL_DO_RFC1323=false

หรือ

เปิด :

sysctl -w net.inet.tcp.rfc1323=true

ปิด :

sysctl -w net.inet.tcp.rfc1323=false

command count tcp state

Posted: 8th June 2009 by admin in network, system
Tags:

netstat -tan | grep ‘:80 ‘ | awk ‘{print $6}’ | sort | uniq -c

การทำ null route บน linux

Posted: 31st May 2009 by admin in network
Tags:

คำสั่งดรอปการโจมตีจาก ip ด้วยคำสั่ง route  บน linux

[root@demo01 ~]#route add xxx.xxx.xxx.xxx reject

คำสั่งตรวจสอบว่าทำการปิดกันเรียบร้อยหรือยังถ้าแสดงข้อความแบบด้านล่างแสดงว่าได้ปิดกั้น ip นั้นเรียบร้อยแล้ว

[root@demo01 ~]#ip route get  xxx.xxx.xxx.xxx
RTNETLINK answers: Network is unreachable

ใช้คำสั่งด้านล่างเพื่อดู ตารางการ route

[root@demo01 ~]#route -n

ใช้คำสั่งด้านล่างเพื่อยกเลิกการปิดกัน ip ดังกล่าว

[root@demo01 ~]#route del -host xxx.xxx.xxx.xxx reject

 หมายเหตุ xxx.xxx.xxx.xxx คือ ip ที่ต้องการปิดกั้น