Raspberry Pi 2 as VPN server - In progess
[i=s] 本帖最後由 ckleea 於 2017-4-16 19:45 編輯 [/i]All in one PPTP, OPENVPN, IPSec, SSTP-Server, Shadowsocks in a Raspberry Pi2
Software to be updated via scripts
[url=https://drive.google.com/a/ck-lee.com/file/d/0B9oltMKtfpe3T3k4UWlSaGxGSEk/view?usp=sharing]第一版[/url]
user:root
password:raspbian
Softethervpn: vpnmgr port:8443
[url=https://drive.google.com/a/ck-lee.com/file/d/0B9oltMKtfpe3MDhPbE9xX0ZzWDQ/view?usp=sharing]第二版[/url] [i=s] 本帖最後由 ckleea 於 2017-5-6 07:28 編輯 [/i]
Scripts to create SoftetherVPN, OCServ and Shadowsocks-libev[code]apt-get -y update
apt-get -y install git subversion aptitude build-essential dh-autoreconf libncurses5-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev libev-dev libwrap0-dev libpam0g-dev liblz4-dev libreadline-dev libnl-route-3-dev libprotobuf-c-dev libtalloc-dev libhttp-parser-dev libpcl1-dev libopts25-dev autogen protobuf-c-compiler gperf liblockfile-bin nuttcp lcov libuid-wrapper libpam-oath libghc-bloomfilter-dev corkscrew libipset-dev
apt-get -y install autoconf libtool libssl-dev gawk debhelper dh-systemd init-system-helpers pkg-config asciidoc xmlto apg libpcre3-dev zlib1g-dev libudns-dev
## Prepare, configure and install SoftetherVPN from sources
cd /opt
git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
cd /opt/SoftEtherVPN
./configure
make
make install
## Prepare, configure and install OCServ from sources
cd /opt
git clone https://gitlab.com/ocserv/ocserv.git
cd /opt/ocserv
autoreconf -fvi
./configure --disable-seccomp && make
## Prepare, configure and install shadowsocks-libev from sources
cd /opt
git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd /opt/shadowsocks-libev
git submodule update --init --recursive
# Installation of Libsodium
git clone https://github.com/jedisct1/libsodium.git
cd libsodium
./configure
make
make install
# Installation of MbedTLS
cd /opt/shadowsocks-libev
export MBEDTLS_VER=2.4.2
wget https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz
tar xvf mbedtls-$MBEDTLS_VER-gpl.tgz
pushd mbedtls-$MBEDTLS_VER
make SHARED=1 CFLAGS=-fPIC
make DESTDIR=/usr install
popd
ldconfig
cd /opt/shadowsocks-libev
./autogen.sh && ./configure && make
make install
[/code] [i=s] 本帖最後由 homeinns 於 2017-4-15 13:55 編輯 [/i]
感謝 CHing, 這不就是我們常駐在大陸港燦的 Dream Box 嘛。
雖然目前我還沒有任何 Raspberry Box 在手, 而且我目前還不懂得使用, 但去淘寶購買一套也很容易, 也不貴。在共產黨强迫你的底下, 我估計,學習設定 Raspberry 也應該不是難事。 因爲有巨大的動力嘛。
希望 CHing develop 成功後,能夠無償的與我們分享你 Compile 和測試妥當的 Dream Box 的軟件。【最好附帶一些 Lu-Lu 也看得懂的, Step-By-Step SetUp Guide】
真是活人無數的哦。請受小弟一拜。這個 Dream Box 是我們在國内存活的必須品哦。
是最重要的精神糧食, 如果沒有了這些精神的糧食, 我們的精神是會被餓死的。
我們現在常駐在國内的港燦的 PPTP VPN, OpenVPN 常常受到共產黨的干擾。 要轉用 CISCO 的 AnyConnect 才比較好一點。 [b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=43655&ptid=7023]3#[/url] [i]homeinns[/i] [/b]
其實差不多完成,欠shadowsocks multi ports multi users 和 samples config
ocserv + softethervpn => ok [b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=43655&ptid=7023]3#[/url] [i]homeinns[/i] [/b]
你可以下載試試。
用16GB SD card
Raspberry Pi 2 based on the latest raspbian image 設定:
Network: 用DHCP取內網地址
OCServ: 設定和密碼檔案在/etc/ocserv
預設vpn full tunnel和ip 10.10.0.1/24
Softether:預設IPSec, OpenVPN and SSTP 全開,SSTP 用8443 port
Shadowsocks: 設定檔案在/etc/shadowsocks 內,它是10個用戶用10個ports
SSTP server: 密碼在/etc/ppp/chap.secrets,預設20443 port
上面的4個服務都經systemd 起動,如果要改起動設定,檔案在/etc/systemd/system 內
pptpd 已經加入但未做任何設定 [i=s] 本帖最後由 99BB 於 2017-4-18 13:31 編輯 [/i]
如果用家用的網絡, shadowsocks如果不加上kcptun速度很慢, 比純用ssh還慢, 不過如果加上kcptun要因應網絡環境細調參數. 調得不當, 隨時扯爆個網.
如果要求不高, 用家中的網絡架設vpn還可以. 如果要求高, 就要花點錢去租用服務器. 想問現在香港邊度仲可以買到 Raspberry Pi ?吾該。 RS
[url]http://hkcn.rs-online.com/web/b/raspberry-pi/?sra=p[/url]
Farnell Element14
[url]http://hk.element14.com/w/search/prl/results?brand=raspberry-pi[/url] Thanks a lot 在大陸,有softether和ssr或者v2ray就夠用了,傳統vpn server隨時比人block。
softether 比電腦上網用(簡單,穩定,不容易被發現)
ssr/v2ray 比手機用(可以長期連線,速度快) 角色師兄, 請問 Raspberry Pi 3b 可以用以上方法嗎 ? 第一版和二版分別是什麼 ?
thanks ~ 应该可以,因为那个时候Raspberry Pi 3b还没有出来。
(不过好像要改写东西,因为主要uname不一样,具体那些软件有指示。) [b]回復 [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&pid=44351&ptid=7023]13#[/url] [i]角色[/i] [/b]
好的 , thanks your help ~
頁:
[1]