作者归档:贝贝爸

advanced tomato

root@tmt-e3200:/tmp/home/root# entware-install.sh

Info: Creating folders...
mkdir: can't create directory '/opt/bin': Read-only file system
mkdir: can't create directory '/opt/etc/': Read-only file system
mkdir: can't create directory '/opt/lib/': Read-only file system
mkdir: can't create directory '/opt/sbin': Read-only file system
mkdir: can't create directory '/opt/share': Read-only file system
mkdir: can't create directory '/opt/tmp': Read-only file system
mkdir: can't create directory '/opt/usr': Read-only file system
mkdir: can't create directory '/opt/var/': Read-only file system
mkdir: can't create directory '/opt/var/': Read-only file system
mkdir: can't create directory '/opt/var/': Read-only file system
Info: Deploying opkg package manager...
Downloading /opt/bin/opkg... wget: can't open '/opt/bin/opkg': No such file or directory
failed!


cd /jffs
mkdir opt
cd ../
mount -o bind /jffs/opt /opt

openwrt shadowsocks chinadns

搭配可以使用的软件
ChinaDNS 1.3.2-3
luci-app-chinadns 1.4.0-1
luci-app-shadowsocks 1.3.7-1
shadowsocks-libev 2.5.6-1

原来的源不行,要修改

src/gz designated_driver_base http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/base
src/gz designated_driver_kernel http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/kernel
src/gz designated_driver_telephony http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/telephony
src/gz designated_driver_packages http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/packages
src/gz designated_driver_routing http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/routing
src/gz designated_driver_luci http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/luci
src/gz designated_driver_management http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/management
# src/gz designated_driver_targets http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/targets

为:
src/gz chaos_calmer_base http://openwrt.proxy.ustclug.org/chaos_calmer/15.05//ramips/mt7620/packages/base
src/gz chaos_calmer_luci http://openwrt.proxy.ustclug.org/chaos_calmer/15.05//ramips/mt7620/packages/luci
src/gz chaos_calmer_management http://openwrt.proxy.ustclug.org/chaos_calmer/15.05//ramips/mt7620/packages/management
src/gz chaos_calmer_packages http://openwrt.proxy.ustclug.org/chaos_calmer/15.05//ramips/mt7620/packages/packages
src/gz chaos_calmer_routing http://openwrt.proxy.ustclug.org/chaos_calmer/15.05//ramips/mt7620/packages/routing
src/gz chaos_calmer_telephony http://openwrt.proxy.ustclug.org/chaos_calmer/15.05//ramips/mt7620/packages/telephony

升级出错可能是wget不支持ssl,更新可以http的源后,即可。

相关配置文件

mkdir /etc/shadowsocks
wget -O- ‘http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest’ | awk -F\| ‘/CN\|ipv4/ { printf(“%s/%d\n”, $4, 32-log($5)/log(2)) }’ > /etc/shadowsocks/ignore.list
wget -O- ‘http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest’ | awk -F\| ‘/CN\|ipv4/ { printf(“%s/%d\n”, $4, 32-log($5)/log(2)) }’ > /etc/chinadns_chnroute.txt

路由器配置

CPU: MT7620N,580MHz。
RAM:32MB
FLASH: 16MB
USB:2.0接口,一个
有线网口:1个RJ45网口,用作 WAN 口。
无线:802.11bgn,2T2R。

linux使用iptables做端口转发

把本机,ip1.1.1.1,端口9002,转发到 2.2.2.2的8080

echo “1” > /proc/sys/net/ipv4/ip_forward
sysctl -p
iptables -t nat -A PREROUTING -d 1.1.1.1 -p tcp –dport 9002 -j DNAT –to-destination 2.2.2.2:8080
iptables -t nat -A POSTROUTING -d 2.2.2.2 -p tcp –dport 8080 -j SNAT –to-source 1.1.1.1

hostus vps香港节点测试

买了一个hostus的 香港vps,公司电信线路ping值不错。

ping hk-lg.hostus.us

Pinging hk-lg.hostus.us [45.124.64.3] with 32 bytes of data:
Reply from 45.124.64.3: bytes=32 time=33ms TTL=45
Reply from 45.124.64.3: bytes=32 time=32ms TTL=45
Reply from 45.124.64.3: bytes=32 time=33ms TTL=45
Reply from 45.124.64.3: bytes=32 time=37ms TTL=45

Ping statistics for 45.124.64.3:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 32ms, Maximum = 37ms, Average = 33ms

但是晚上在家就不行。

ping hk.coolxigua.com

正在 Ping hk.coolxigua.com [45.124.64.163] 具有 32 字节的数据:
来自 45.124.64.163 的回复: 字节=32 时间=309ms TTL=49
来自 45.124.64.163 的回复: 字节=32 时间=309ms TTL=49
请求超时。
请求超时。

45.124.64.163 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 2,丢失 = 2 (50% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 309ms,最长 = 309ms,平均 = 309ms

还好,支持三天退货,我填了一个ticket,就退款到paypal了。

香港,悉尼,新加坡的价格稍微贵点17.45$,其他的地方都比较便宜,一个季度7.95$。用coupon “VPS15OFF”可以打85折。有兴趣的可以买一个试试:hostus

digitalocean.com优惠码

digitalocean.com是在美国纽约的一个vps提供商,点击下面链接注册,你能得到10美元的优惠券。

https://www.digitalocean.com/?refcode=7ca8065bcdd9

最新优惠码:目前仅需通过本站注册并激活即可获得10美元账号余额,点击注册
UBUNTUDROPLET 获得10美元账号余额。
10TOSHIP 获得10美元账号余额。
RUBYDROPLET 获得10美元账号余额。
DEPLOY2DO 获得10美元账号余额。
2014SSD 获得10美元账号余额。
HOLIDAYSSD 获得10美元账号余额。
BLACK50 获得50美元账号余额,仅限黑色星期五当天有效。
DIVEIN10 获得10美元账号余额。
SSDTWTTR 获得10美元账号余额。
OCT15FREE 获得15美元账号余额。

有问题请留言