Wednesday, November 21, 2012
command line to connect wifi in Linux
=============== WPA only ============
step 1:
ifconfig wlan0 up
wpa_passphrase yournetworkessid passphrase > /opt/wpa_configure.conf
step 2, vi to edit more info into it: (vi quick guide: start "vi filename" then press "i" for insert mode, after edit press ESC for cmd mode, type :w to write, :q to quit)
ssid=yournetworkessid
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk=f242925f83787084d58101d5eb52485989e2a553983bfe6fc5b8d27fdfa063bd
step 3, connect:
wpa_supplicant -iwlan0 -c/opt/wpa_configure.conf &
step 3, dhcp to get IP:
udhcpc -i wlan0
=============== WEP only =============
Tools to use:
ifconfig: Enable your wireless device.
iwlist: List the available wireless access points.
iwconfig: Configure your wireless connection.
dhclient: Get your IP address via dhcp.
Step 1: enable your wifi device (ifconfig wlan0 down)
ifconfig wlan0 up
Step 2: scan wifi network
iwlist wlan0 scan
Step 3: connect to the wifi (WEP only) network
iwconfig wlan0 essid NETWORK_ID key s:WIRELESS_PASSWORD
Step 4: dhcp to get IP address
udhcpc -i wlan0
OR dhclient wlan0
manual IP, gateway:
ifconfig wlan0 192.168.1.9 netmask 255.255.255.0 up
route add default gw 192.168.1.1
============== to change mac address ========
ifconfig eth0 down hw ether 00:00:00:00:00:01
ifconfig eth0 up
Thursday, August 2, 2012
Using IP Sec policy to block a specified IP
Tried on XP & 7:
Start - Run - mmc
File - Add/Remove Snap In
IP Security Policy Management (Local computer)
Right click IP Security Policy... - Create IP Security Policy
Use a cert from this CA - Any one (Microsoft ...coz the pc is not part of ActiveDirectory)
Add
This rule does not specify a tunnel
All Network connection
Add, Add, A specified IP Address (192.168.1.5)
My IP Address
Make sure you click the radio button "New IP Filter List" in IP filter lists:, Next
Add, Block
Make sure you click the radio button "New Filter Action" in Filter Actions:, Next
Right click the new "New IP Security Policy" - Assign
Thursday, May 3, 2012
dead battery in desktop pc (sync pc time)
I knew I should replace it with new one to get its date & time running.
Or run the script every time the pc boots up:
type c:\lastdate | date
echo 08:30:00 | time
w32tm /resync
echo %date% > c:\lastdate
update the windows registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config]
"MaxNegPhaseCorrection"=dword:ffffffff
"MaxPosPhaseCorrection"=dword:ffffffff
Wednesday, May 2, 2012
setup VPN server for windows XP pro
Setup VPN server
-Start
-Control Panel
-Network Connections
-Create New Connection
-Setup An Advanced Connection
-Acept Incoming Connection, Next
-Allow Virtual Private Connection
-choose some users
-Specify TCP/IP addresses: 192.168.0.2 to 192.168.0.200, Allow calling computer to specify its own IP address
-specify (some where, TCP/IP) own IP: 192.168.0.1
-configure your firewall (software & router)
Connect it with windows 7
-Open Network and Sharing Centre
-Setup a new connection or network
-Connect to a workplace (dial-up or VPN connection..)
-No,Create a new connection
-Use my Internet Connection (VPN)
To test:
file sharing \\192.168.0.1
Remote Desktop 192.168.0.1
-Start
-Control Panel
-Network Connections
-Create New Connection
-Setup An Advanced Connection
-Acept Incoming Connection, Next
-Allow Virtual Private Connection
-choose some users
-Specify TCP/IP addresses: 192.168.0.2 to 192.168.0.200, Allow calling computer to specify its own IP address
-specify (some where, TCP/IP) own IP: 192.168.0.1
-configure your firewall (software & router)
Connect it with windows 7
-Open Network and Sharing Centre
-Setup a new connection or network
-Connect to a workplace (dial-up or VPN connection..)
-No,Create a new connection
-Use my Internet Connection (VPN)
To test:
file sharing \\192.168.0.1
Remote Desktop 192.168.0.1
Wednesday, March 28, 2012
delete fb account permanently
Mar 2012: If you click Deactivate your account under Account Settings - Security, you only temporary deactivate it. You may login with the same email & password anytime and its content remained.
The following links may permanently delete your account and all its content:
https://ssl.facebook.com/help/contact.php?show_form=delete_account
The following links may permanently delete your account and all its content:
https://ssl.facebook.com/help/contact.php?show_form=delete_account
Subscribe to:
Posts (Atom)