20 December 2013

Chromium guna Flash yg lain

By default, chromium guna flash version 11.2.x

Utuk guna flash yg terbaru(spt yg digunakan oleh google-chrome),

chromium-browser --ppapi-flash-path=/opt/google/chrome/PepperFlash/libpepflashplayer.so  --ppapi-flash-version=11.9.900.170

ref: http://www.webupd8.org/2012/09/how-to-make-chromium-use-flash-player.html

19 December 2013

DHCP: cara nak abaikan default gw

DHCP response dari server akan assign default gw.
Bagaimana nak elakkan OS dari gunakan gw ini.

File: /etc/dhcp3/dhclient.conf
interface "eth1" { 
 request subnet-mask, broadcast-address, time-offset, interface-mtu; 
}

ref: https://lists.isc.org/pipermail/dhcp-users/2011-April/013451.html



Better Solution

1) sudo aptitude install ifmetric
2) file: /etc/network/interfaces
     allow-hotplug eth0 
     iface eth0 inet dhcp 
           metric 1 

     allow-hotplug eth1 

18 December 2013

bash skrip: beri input pada program

#!/usr/bin/expect -f
spawn openvpn client.warriors.conf.open
match_max 100000
expect "*?assword:*"
send -- "mypassword"
send -- "\r"
expect eof

ref: http://stackoverflow.com/questions/11240184/pass-private-key-password-to-openvpn-command-directly-in-ubuntu-10-10

17 December 2013

switch kawal MAC address

Sesetengah admin, kawal LAN berdasarkan pendaftaran MAC

sebelum white list:
#arp -an
(10.0.5.110) at 00:1D:09:67:89:7B

MAC adress sebenar adalah yg lain.
Mungkin,  switch spoofkan semua MAC address yg belum register.

16 December 2013

soket

Soalan:
Bagaimana multi client boleh connect serentak ke server yg hanya listen pada satu port(ie: 80)?


A socket is identified by {SRC-IP, SRC-PORT, DEST-IP, DEST-PORT, PROTOCOL} not by {SRC-IP, SRC-PORT, DEST-IP, DEST-PORT} - Protocol is an important part of a socket's definition.




ref: http://stackoverflow.com/questions/3329641/how-do-multiple-clients-connect-simultaneously-to-one-port-say-80-on-a-server