2011年12月15日星期四

Network problem with VMware Fusion bridged autodetect mode

Vmware fusion 4.1.0 under OS X has a bug when using Bridged autodetect mode.

For example, suppose you have a cabled ethernet and also a WiFi connection. If you set the Guest OS to use ethernet as bridged with autodetect mode, it works fine at the beginning, but when you switch your Host internet connection from cable to WiFi, and switch back, the Host ethernet would not able to determine the status, let alone establish a connection.
The solution is easy, set the Guest OS to use ethernet as bridged but with a specific network adaptor and problem will fix immediately.

http://www.ianmcshane.org/2010/03/12/vmware-fusion-network-bridge-error-finally-solved/

2011年12月8日星期四

OpenVPN configuration files

server (Ubuntu Server).
local 10.xx.xx.xx
port PORT_NUMBER
proto udp
dev tun
ca /YOUR_CA_DIR/ca.crt
cert /YOUR_CA_DIR/key-server.crt
key /YOUR_CA_DIR/key-server.key
dh /YOUR_CA_DIR/dh1024.pem
cipher AES-128-CBC # AES is faster than BF
max-routes 3000
ifconfig-pool-persist ipp.txt
server 10.168.1.0 255.255.255.0
push "redirect-gateway"
push "dhcp-option DNS 208.67.220.220" # OpenDNS.
push "dhcp-option DNS 208.67.222.222"
client-to-client
duplicate-cn
keepalive 10 60
comp-lzo
max-clients 10
persist-key
persist-tun
status openvpn-status.log
log-append openvpn.log
verb 3
mute 20



Client (MAC OS X)
remote SERVER_IP SERVER_PORT udp
persist-key
tls-client
pull
ca ca.crt
redirect-gateway def1
dev tun
persist-tun
cert cert.crt
comp-lzo no
nobind
key key.key
remote-cert-tls server
script-security 2
cipher AES-128-CBC

delayed auto start Apps after login to OS X

using applescript.
start up QQ Mail FireFox and VMware Fusion automatically.
the last one is refresh time with internet time server.

delay 60
do shell script "open /Applications/QQ.app"
delay 15
do shell script "open /Applications/Mail.app"
delay 30
do shell script "open /Applications/FireFox.app"
delay 60
do shell script "open /Applications/'VMware Fusion.app'"
delay 5
do shell script "sudo ntpdate 133.100.11.8" password "YOUR_PASSCODE" with administrator privileges

Re Activate MathType for Mac OS X

Delete the following files and reinstall MathType.

/Library/Application Support/.AppOptions67.plist
/Library/Application Support/.InstallOptions67.plist

Something about our Lab

Theory is when you know everything but nothing works.
Practice is when everything works but no one knows why.
In our lab, theory and practice are combined: nothing works and no one knows why.

Serv-U使用网络驱动器的问题

今天有人要通过ftp服务器(10.10.9.166)连接到他自己电脑(10.10.9.17)的E盘。
在服务器上把17上E盘映射为Z:盘,在Serv-U里面开启临时账户,根目录为Z:
发现登录后怎么也显示不出来文件夹内容。

经搜索发现是权限的问题。Serv-U是默认作为System Service,以System用户运行的,
而映射的磁盘Z:是我自己的帐号创建,两个用户权限不一致,所以无法读取。
而将Serv-U以我的管理帐号运行以后,就可以正常登录并使用网络映射的Z:盘。
只不过这样的话,如果注销,serv-U就会被关闭,所以得将我的管理帐号一直处于login状态,
感觉server2003内存管理不善,时间长了内存占用就上去了,导致反映变慢。

Does the polarization of light change after reflecting off a mirror?

  • Does the polarization of light change after reflecting off a mirror?
  • Yes. If linearly polarized light is incident upon a mirror (whether aluminum or gold coated), the polarization is rotated 180° to the incident beam. 

  • When P-polarized light is incident on an elliptical metallic reflector, is the polarization of the reflected light unchanged or is it randomly polarized?
  • When polarized light is incident on a conductive surface like a metallic coating, a 180° phase factor gets added to the beam. If you start with linear polarized light, this rotates the polarization direction from θ to θ +180° which is the same linear polarization direction. Circular polarization, which can be defined as two equal linear states with 90° phase difference between them, undergoes a more obvious change. 180° is added to the phase difference and it becomes 270° (or -90°). This means the linear state that was leading is now lagging the other (orthogonal) piece by a quarter wave.
from Edmund
http://www.edmundoptics.com/technical-support/technical-library/frequently-asked-questions/index.cfm?categoryid=15

2011年11月11日星期五

server 2003的portforward功能,转发远程桌面连接

windows server 2003的netsh自带portforward功能,
可以将主机A连接到本机特定端口的连接转发到主机B,以实现比如FTP, 远程桌面连接等的转发
netsh interface portproxy > add v4tov4 port1 a.b.c.d port2

使用Amazon Web Service搭建自己的openVPN代理(未完成)

  • 申请一个Amazon Web Service帐号
     amazon的web service(http://aws.amazon.com/)目前的政策是一年内有一定的免费使用额度,按照提示一步步操作的即可。

注意事项:
  1. 注册中需要提供信用卡信息。Amazon会从卡上扣一美元,再即时退回,以验证信用卡。所以你会收到消费提示,但实际账单上并不会有支出。
  2. 注册中要提供可直接联系到你的电话或手机信息,国家代码+86最好一并写上。Amazon会即刻电话通知你验证码,需要填写到申请表格中。
  • 在AWS上面建立Linux服务器
在AWS上登录后,进入EC2 tab项,启动一个新的instance,选择ubuntu-server,32或64位均可,
  • 安装openvpn并配置
  • 在客户端建立vpn连接