以下是Ubuntu11下的使用方法

  1. 这里下载
    http://download.softether.co.jp/folder/vpn4_beta/v4.00-8612-rc1_fix3-2012.11.30/Linux/PacketiX%20VPN%20Client/32bit%20-%20Intel%20×86/
  2. 解压缩之后进入目录,run make
    如果有其他依赖安装包,假设你可以解决,否则参考
    http://dardofrecuencias.blogspot.com/2011/08/how-to-install-free-vpn-in-ubuntu.html
  3. 运行vpn Service
    ./vpnclient start
  4. 配置vpn service
    ./vpncmd
    vpncmd command – PacketiX VPN Command Line Management Utility
    PacketiX VPN Command Line Management Utility (vpncmd command)
    Version 2.20 Build 5350 (English)
    Compiled Oct 9 2007 01:27:58 by yagi at ILC308
    Copyright (C) 2004-2007 SoftEther Corporation. All Rights Reserved.
    By using vpncmd program, the following can be achieved.1. Management of VPN Server or VPN Bridge
    2. Management of VPN Clinet
    3. Use of VPN Tools (certificate creation and communication speed measurement)Select 1, 2 or 3:
    选2
    Specify the host name or IP address of the computer that the destination VPN Client is operating on.
    If nothing is input and Enter is pressed, connection will be made to localhost (this computer).
    Input destination:

    敲回车
    Connected to VPN Client “localhost“.
    VPN Client>

    创建nic
    VPN Client>niccreate
    NicCreate command – Create New Virtual Network Adapter
    Virtual Network Adapter Name: 0
    The command terminated normally.

    列出nic
    VPN Client>niclist
    NicList command – Get List of Virtual Network Adapters
    Item |Value
    —————————-+———————————–
    Virtual Network Adapter Name|0
    Status |Enabled
    MAC Address |00AC9D035CF6
    Version |Version 2.20 Build 5350 (English)
    The command terminated normally.

    创建account
    VPN Client>accountcreate
    AccountCreate command – Create New VPN Connection Setting
    Name of VPN Connection Setting: VPN
    Destination VPN Server Host Name and Port Number: public.softether.com:443
    Destination Virtual HUB Name: PUBLIC
    Connecting User Name: PUBLIC
    Used Virtual Network Adapter Name: 0
    The command terminated normally.

    列出account
    VPN Client>accountlist
    AccountList command – Get List of VPN Connection Settings
    Item |Value
    —————————-+———————————————–
    VPN Connection Setting Name |VPN
    Status |Offline
    VPN Server Address |public.softether.com (Direct TCP/IP Connection)
    Virtual Network Adapter Name|0
    The command terminated normally.
    连接account
    VPN Client>accountconnect
    AccountConnect command – Start Connection to VPN Server using VPN Connection Setting
    Name of VPN Connection Setting: VPN
    The command terminated normally.

    再次列出account,注意status已经是Connected
    VPN Client>accountlist
    AccountList command – Get List of VPN Connection Settings
    Item |Value
    —————————-+———————————————–
    VPN Connection Setting Name |VPN
    Status |Connected
    VPN Server Address |public.softether.com (Direct TCP/IP Connection)
    Virtual Network Adapter Name|0
    The command terminated normally.

    将此帐户设为缺省连接
    VPN Client>AccountStartupSet
    AccountStartupSet command – Set VPN Connection Setting as Startup Connection
    Name of VPN Connection Setting: VPN
    VPN Client>quit
  5. 获得ip地址,并修改路由表
    ifconfig vpn_0vpn_0 Link encap:Ethernet HWaddr 00:ac:9d:03:5c:f6
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1603 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:500
    RX bytes:463867 (463.8 KB) TX bytes:0 (0.0 B)假设你的网关是192.168.1.1,那么
    route add -net 130.158.6.0/24 gw 192.168.1.1
    将vpn网段导到192.168.1.1,然后
    dhclient vpn_0
    从vpn server获得ip地址,再
    ip route del default via 192.168.1.1
    ip route add default via 10.0.0.1 dev vpn_0

    将所有路由导到vpn Gateway 10.0.0.1

Note:

  • (2013.08.18) – 从某日起,该server(public.softether.com)似乎停止工作了,但有更多的server选择,参考http://www.vpngate.net/en/; 而且网关也从10.0.0.1变为10.211.254.254. 连接用户从PUBLIC变为VPNGATE
  • vpncmd is also a utility which can be used to automating management tasks
  • (2013.11.13) – softether client 即使能连接上,youtube.com也访问不了,GFW的威力是不断进化的。
  • (2013.11.13) – 若干年前被封杀的freegate现在又活了,反而是若干年前能用的softether现在又遭封了
  • goagent虽然能访问某些被禁网站,但有些被禁网站依然是访问不了
Advertisements