debian 6 openvpn

1:安装
apt-get install openvpn iptables

2:配置服务端

cp -R /usr/share/doc/openvpn/examples/easy-rsa /etc/openvpn
cd /etc/openvpn/easy-rsa/2.0
chmod +x vars
source ./vars
./clean-all

./build-ca
这一步,您一直回车就行,不要填密码,如果要求你回答Y还是N,选Y回车

./build-key-server server

./build-key client1
这2步也跟上面一样,一路回车和选择Y回车

./build-dh

3:配置转发
vi /etc/rc.local
添加以下语句,您只要替换“208.110.73.134”为您自己的ip就行
# add iptables rule for openvpn
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j SNAT --to 208.110.73.134

4:增加服务器端conf文件
vi /etc/openvpn/openvpn.conf
增加如下内容
dev tun
proto tcp
port 1194

ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem

user nobody
group nogroup
server 10.8.0.0 255.255.255.0

persist-key
persist-tun

#status openvpn-status.log
#verb 3
client-to-client

push “redirect-gateway def1″
push “dhcp-option DNS 69.197.153.253″
push “dhcp-option DNS 69.30.192.15″

comp-lzo

ok,启动openvpn服务
/etc/init.d/openvpn start
nohup /etc/rc.local &

5:客户端安装配置
http://openvpn.net/index.php/open-source/downloads.html 下载winodws客户端
安装后,然后从服务器把以下3个文件拷贝到windows安装路径下的config目录
这3个文件分别是
/etc/openvpn/easy-rsa/2.0/keys/ca.crt
/etc/openvpn/easy-rsa/2.0/keys/client1.crt
/etc/openvpn/easy-rsa/2.0/keys/client1.key

6:增加客户端配置文件
在config增加一个配置文件,文件名为client.ovpn
内容如下:
client
dev tun
proto tcp

# The hostname/IP and port of the server.
# CHANGE THIS TO YOUR VPS IP ADDRESS
remote 208.110.73.134 1194

resolv-retry infinite
nobind

persist-key
persist-tun

ca ca.crt
cert client1.crt
key client1.key

comp-lzo
verb 3

 

 

File excerpt:/etc/sysctl.conf

net.ipv4.ip_forward=1

Issue the following command to set this variable for the current session:

echo 1 > /proc/sys/net/ipv4/ip_forward
Read more...

debian 6 install webmin

 

运行  apt-get -f install

 

 

/etc/apt/sources.list

deb http://ftp.fr.debian.org/debian/ squeeze main
deb http://ftp.fr.debian.org/debian/ squeeze-updates main
deb http://security.debian.org/ squeeze/updates main
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

 


If you like to install and update Webmin via APT, edit the /etc/apt/sources.list file on your system and add the lines :


deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

 


You should also fetch and install my GPG key with which the repository is signed, with the commands :
cd /root
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc

 


You will now be able to install with the commands :
apt-get update
apt-get install webmin
All dependencies should be resolved automatically.

Read more...

x79-ud5

用2.09打开BIOS,

厂商选:其他;

SLIC:选择你喜欢的;

SLP:选择你喜欢的(可以与SLIC相同也可以不同品牌);

RW空着;

验证:空着;

工具自动选择“模块法”,点执行,OK!

Read more...

Running Your Own Application at Startup

Method 1

  1. Log into your QNAP device using SSH or Telnet, for instance by using Putty
  2. Optional: install nano; use ipkg install nano & edit with nano instead of vi
  3. TS-201: Mount the config ramblock /dev/mtdblock4:
    # mount -t ext2 /dev/mtdblock4 /tmp/config 
  4. TS-109, TS-109P, TS-110, TS-119, TS-209, TS-209P, TS-219, TS-409 (Marvell ARM), TS-419P: Mount the config ramblock /dev/mtdblock5:
    # mount -t ext2 /dev/mtdblock5 /tmp/config
  5. TS-439, TS-509, TS-639, TS-809, TS-809U (x86): Mount the config ramblock /dev/sdx6:
    # mount -t ext2 /dev/sdx6 /tmp/config
  6. Create/Edit /tmp/config/autorun.sh .
    1. either using vi:
      # vi /tmp/config/autorun.sh
      1. Get vi editor into edit mode: press a
      2. Edit whatever you need to
      3. Exit edit mode: press ESC
      4. Save and exit: press ZZ
    2. or editing it using a desktop PC and e.g. SFTP
  7. Ensure that /tmp/config/autorun.sh is executable:
    # chmod +x /tmp/config/autorun.sh
  8. IMPORTANT: Unmount the mounted flash partition:
    # umount /tmp/config
Read more...
Subscribe to this RSS feed
Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 18

Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 2 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 3 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category.php on line 191

Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 18

Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 2 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 3 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34