2011年11月16日 星期三

PXELinux 設定範例

/etc/xinetd.d/tftp
---------------------------------------------
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}

/etc/dhcpd.conf
-------------------------------------------
ddns-update-style none;
ignore client-updates;
allow booting;
allow bootp;
subnet 192.168.56.0 netmask 255.255.255.0 {
range 192.168.56.10 192.168.56.20;
option broadcast-address 192.10.0.255;
option routers 192.168.56.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.19.10;
next-server 192.168.56.101;
filename "linux-install/gpxelinux.0";
}

/tftpboot/linux-install/pxelinux.cfg/default
--------------------------------------------
DEFAULT menu.c32
PROMPT 0
ALLOWOPTIONS 0
TIMEOUT 50

LABEL linux
MENU LABEL LINUX
KERNEL vmlinuz
append initrd=initrd.img


LABEL local
kernel chain.c32
append hd0 0


LABEL dos
MENU LABEL DOS
kernel memdisk
append initrd=dos.img


LABEL memtest
MENU LABEL MEMTEST
kernel memdisk
append iso initrd=memtest86+-4.20.iso

2011年11月3日 星期四

PROXMOX新增WEB帳號


1.ssh login
2.add user
3.add user group id 0

2011年10月25日 星期二

XP命令列批次刪除空目錄

for /f %a IN ('dir /a:d /b') do rd "%a"

2011年9月14日 星期三

開啟 ZyXEL NSA 221 Telnet

1.安裝套件 PHP-MySQL-phpMyAdmin

2.啟用Web發行功能,將 public加入

3.啟用套件 PHP-MySQL-phpMyAdmin

4.編輯共用 public 勾選 將此共享發行至 Web

5.連線共用磁碟 net use * \\<ip>\public
新增檔案 getpasswd.php 內容如下
<?php
echo '<pre>
login:NsaRescueAngel
password:';

system('/sbin/makekey');
echo '</pre>';
?>

6.下列網址開啟 telnet 後門,帳號為:NsaRescueAngel
http://<ip>/zyxel/cgi-bin/remote_help-cgi?type=backdoor

7.下列網址取得密碼
http://<ip>/public/getpasswd.php

2011年8月15日 星期一

QNAP TS-219P ssh 輸入中文

編輯 /etc/inputrc 新增以下內容

set convert-meta off

2011年8月4日 星期四

D-LINK dns-323 讓 lighttpd 在PORT 80執行

以下適用於 fun-plug 05,必須先完成安裝 fun-plug 05

ssh / telnet 登入dns-323 執行以下指令

1.修改 /ffp/etc/lighttpd.conf
#server.port = 8080
server.port = 80

2.關閉 系統 web 管理界面
sh /ffp/start/kickwebs.sh start

3.重新啟動 lighttpd
sh /ffp/start/lighttpd.sh restart

其他:
系統 web 管理界面一段時間會自行啟動埠改至 81

2011年8月3日 星期三

D-LINK dns-323 使用 MySQL

以下適用於 fun-plug 05,必須先完成安裝 fun-plug 05

ssh / telnet 登入dns-323 執行以下指令

1.建立所需資料庫
mysql_install_db

2.將 /srv 目錄移至 /mnt/HD_a2/ 避稅 MySQL 空間不足
mv /srv /mnt/HD_a2/
ln -s /mnt/HD_a2/srv /srv

3.啟動 MySQL
sh /ffp/start/mysqld.sh start