5/25/2012

快速設定網路 on windows - use netsh command

最近常常需要在不同電腦上設定不同的網路, 每次都要開控制台又要進到網路連線設定按一堆鍵, 久了實在是覺得很沒有效率, 為了改善此一現狀, 可以使用netsh 這個windows內建的指令來做設定.

1. 首先使用管理者權限開啟CMD

2. 輸入下列指令設定本機IP與DNS server:

[以下只是範例 exmaple]
netsh interface ip set address "區域連線" static 192.168.0.1 255.255.255.0 192.168.0.254 1
netsh interface ip set dns "區域連線" static 8.8.8.8

3. 完成


5/16/2012

Show iptable rules with interface info

#iptables -L -v


and see the "in" "out" column


If you only want to see the iptable rules with certain interface,
use some thing like iptables -L -v | grep eht0.

5/11/2012

replace localhost CNAME : Proxy debugging tool [CNAME]

http://www.charlesproxy.com/download/latest-release/download.do


5/08/2012

筆電當AP , turn your windows 7 laptop into a Wi-Fi Hotspot

1. 進入命令提示字元 (用管理者權限開啟) - enter cmd

>netsh wlan set hostednetwork mode=allow ssid=NAME key=PASSWORD

2.

>netsh wlan start hostednetwork


3. 進入控制台中的網路介面設定, 在剛剛新增的連線 -> 右鍵 -> 內容 -> 共用

勾選 允許其他網路使用者透過這台電腦的網際網路連線來連線

不勾選 允許其他網路使用者來控制或停用網際網路連線共用



完成 :D

5/07/2012

HLS (for iphone, ipad streaming service) server 架設

1. Download AVC streamer :

http://www.geardownload.com/d.php?id=69428&url=http://files.geardownload.com/3a54e-ff8ed/dl012/avcstreamer_win32_v0.02-alpha.zip

2. unzip

3. modify  /etc/avcserver.conf

{


# listen=[local HTTP server ip address]:[port]
# listen=127.0.0.1:8080
listen=127.0.0.1:8080
#modify to your own server IP or domain name

# media=[ media library dir ]
# This is the root directory of all your stored video files
# media=
media=/videos
#modify to the directory you want to put video files in

# home=[ AVCstreamer home dir ]
# Default value is automatically discovered based on invocation path
# home=
home=../
#root path


}

4. run

5/03/2012

清空DNS快取 [windows]

> ipconfig /flushdns

這個指令目前個人是常用於 更新某個domain name 所要對應到的IP

example: 我已經在 hosts file 裡面設定 www.yahoo.com.tw 對應到的IP 是我自己架設server之IP, 這時候由於之前我已經問過DNS server about the www.yahoo.com.tw 的 IP, 所以要先清空這筆DNS快取內的old record.

win7 下 hosts file path :   C:\Windows\System32\drivers\etc\hosts