V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  datocp  ›  全部回复第 264 页 / 共 302 页
回复总数  6030
1 ... 260  261  262  263  264  265  266  267  268  269 ... 302  
❮ ❯
2015 年 12 月 18 日
回复了 LINAICAI 创建的主题 › 问与答 › 服务器有点多,应该拿来做什么呢
3 台了, 4.9T 的流量,一个人一个月用不了 100G 。
2015 年 12 月 18 日
回复了 Counter 创建的主题 › 问与答 › ufw 的状态是 active 但不生效
ufw 是谁造的轮子,虽然规则读起来很有语义还不如直接掌握 iptables 。
以前
iptables -P INPUT ACCEPT
iptables -A INPUT -j DROP #一直以为这句 DROP 所有连接,
一年后才发现根本没用,还是得默认 iptables -P INPUT DROP 才是真正的丢弃所有未允许的服务。
习惯用 iptables-save iptables-restore iptables -S INPUT 多熟悉一下常用防火墙结构也就那三两句。
2015 年 12 月 18 日
回复了 kj54321 创建的主题 › 宽带症候群 › 不吹不擂, vultr 东京实测
2015 年 12 月 18 日
回复了 kj54321 创建的主题 › 宽带症候群 › 不吹不擂, vultr 东京实测
晚上 21 : 14 分的。。。为什么什么样的 vps 都没什么惊喜,也许还没入电信黑名单吧。。。这还是锐速加速过后的。。。

http://ww2.sinaimg.cn/large/0060lm7Tgw1ez44g16mtsj30nf0dg0uk.jpg
2015 年 12 月 18 日
回复了 kj54321 创建的主题 › 宽带症候群 › 不吹不擂, vultr 东京实测
哎,中国的网络管制真是无法无天,从中间两边断开。太他妈无法无天了,还天天依法制国,制你妹。
2015 年 12 月 18 日
回复了 kj54321 创建的主题 › 宽带症候群 › 不吹不擂, vultr 东京实测
服务器端。。。。

2015.12.18 10:59:49 LOG3[20]: SSL_accept: Peer suddenly disconnected
2015.12.18 11:01:04 LOG3[21]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:01:09 LOG3[12]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:01:11 LOG3[15]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:01:11 LOG3[17]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:01:11 LOG3[18]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:01:11 LOG3[14]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:01:50 LOG3[23]: SSL_accept: Peer suddenly disconnected
2015.12.18 11:01:50 LOG3[24]: SSL_accept: Peer suddenly disconnected
2015.12.18 11:06:16 LOG3[32]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:06:16 LOG3[34]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:06:17 LOG3[33]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:06:17 LOG3[36]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:06:17 LOG3[28]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:06:17 LOG3[31]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:06:34 LOG3[56]: SSL_accept: Peer suddenly disconnected
2015.12.18 11:07:58 LOG3[50]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:07:58 LOG3[52]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:07:59 LOG3[53]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:10:22 LOG3[60]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:10:22 LOG3[65]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:10:39 LOG3[61]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:10:54 LOG3[66]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:10:55 LOG3[76]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:10:56 LOG3[78]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:11:55 LOG3[74]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:19:30 LOG4[ui]: Insecure file permissions on /da/ca/stunnel.pem
2015.12.18 11:21:08 LOG4[ui]: Insecure file permissions on /da/ca/stunnel.pem
2015.12.18 11:24:25 LOG3[0]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:24:31 LOG3[29]: Unexpected socket close (s_ssl_read)
2015.12.18 11:24:57 LOG3[5]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:24:57 LOG3[9]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:24:57 LOG3[6]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:24:57 LOG3[8]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:24:58 LOG3[4]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:24:59 LOG3[3]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:25:01 LOG3[7]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:25:27 LOG3[11]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:25:28 LOG3[12]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:26:27 LOG3[18]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:26:27 LOG3[19]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:26:29 LOG3[28]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:26:33 LOG3[15]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:26:34 LOG3[30]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:27:39 LOG3[31]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:28:07 LOG3[43]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:28:07 LOG3[38]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:28:07 LOG3[42]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:28:26 LOG3[44]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:28:46 LOG3[46]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:28:46 LOG3[48]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:28:46 LOG3[50]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:28:46 LOG3[49]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:28:55 LOG3[51]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:29:15 LOG3[55]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:29:30 LOG3[60]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:29:30 LOG3[59]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:33:32 LOG3[63]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:34:56 LOG3[64]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:34:56 LOG3[67]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:34:56 LOG3[70]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:34:56 LOG3[71]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:34:57 LOG3[66]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:35:01 LOG3[68]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:35:02 LOG3[72]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:35:07 LOG3[69]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:35:38 LOG3[86]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:35:42 LOG3[91]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:35:43 LOG3[74]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:36:17 LOG3[81]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:36:26 LOG3[79]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:36:26 LOG3[92]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:36:26 LOG3[77]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:36:41 LOG3[96]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:37:01 LOG3[102]: s_connect: s_poll_wait 23.251.96.136:80: TIMEOUTconnect exceeded
2015.12.18 11:37:02 LOG3[103]: s_connect: s_poll_wait 23.251.96.136:80: TIMEOUTconnect exceeded
2015.12.18 11:37:03 LOG3[104]: s_connect: s_poll_wait 23.251.96.136:80: TIMEOUTconnect exceeded
2015.12.18 11:38:24 LOG3[114]: Unexpected socket close (s_ssl_read)
2015.12.18 11:38:54 LOG3[106]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:38:55 LOG3[108]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:38:55 LOG3[107]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:38:57 LOG3[109]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:39:01 LOG3[105]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:39:01 LOG3[102]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:39:02 LOG3[103]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015.12.18 11:39:42 LOG3[101]: transfer: s_poll_wait: TIMEOUTclose exceeded: closing
2015 年 12 月 18 日
回复了 kj54321 创建的主题 › 宽带症候群 › 不吹不擂, vultr 东京实测
嘿嘿,我可以说别高兴太早,苦日子还在后头吗。。。这个服务器我还一个月都没试用完了。今天先是体验到 1000mbps 的情况,然后今天好像倒霉的就是测试了一下 softether vpn client ,结果现在成这样了,这是这段时间的最恐怖体验,已经基本不可用状态。。。。。。。。。。。。。

哎,真的别高兴太早,我以前推荐的时候,别的朋友就说很慢,现在轮到我说慢了,垃圾电信。

2015.12.18 19:35:44 LOG3[291]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[291]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG3[295]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[295]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG3[297]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[297]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG3[299]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG3[293]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[299]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG5[293]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG3[290]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[290]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG3[292]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[292]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG3[296]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[296]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG3[298]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[298]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG3[300]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[300]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG3[294]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:44 LOG5[294]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:44 LOG5[301]: Service [server6] accepted connection from 127.0.0.1:9127
2015.12.18 19:35:44 LOG6[301]: s_connect: connecting xxx.xxx.xxx.xxx:80
2015.12.18 19:35:48 LOG6[288]: Read socket closed (readsocket)
2015.12.18 19:35:48 LOG6[288]: SSL_shutdown successfully sent close_notify alert
2015.12.18 19:35:48 LOG5[288]: Connection closed: 529 byte(s) sent to SSL, 185807 byte(s) sent to socket
2015.12.18 19:35:54 LOG3[301]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:35:54 LOG5[301]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:35:54 LOG5[302]: Service [server6] accepted connection from 127.0.0.1:9129
2015.12.18 19:35:54 LOG6[302]: s_connect: connecting xxx.xxx.xxx.xxx:80
2015.12.18 19:36:04 LOG3[302]: s_connect: s_poll_wait xxx.xxx.xxx.xxx:80: TIMEOUTconnect exceeded
2015.12.18 19:36:04 LOG5[302]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2015.12.18 19:36:04 LOG5[303]: Service [server6] accepted connection from 127.0.0.1:9131
2015 年 12 月 18 日
回复了 imcj 创建的主题 › VPS › 寻人一起合租一个 cn2 网络的 vps,各自按流量付费
iptables 计数并不准确的,这个计数就是用 tcpping 都能让它增加计数。其实都按量了,完全可以用 iptables knock door 方法,必要时敲开防火墙端口,平时屏蔽所有访问,这样流量就省了。
2015 年 12 月 18 日
回复了 lyping 创建的主题 › VPS › 腾讯云靠谱吗? Linode 还是腾讯云?
能翻你再想想那可怜的 100kb/s , 100kb 哦,用惯国外的大水管,再用回这种小水管受不了。又贵又烂,话说家里也有 140kb/s 上行, openwrt 都可以支撑各种 web vpn proxy 了。
先把这两篇基础的搞定,对 softether 就有个大概的了解。不懂为什么 softether 外面又有一层 socks 连接。如果用 vpn ,你原先的环境就要变化,按现在的设想是有个网关设备,统一将不同的代理服务器连接到本地虚拟机操作系统里的虚拟接口 soft soft1 soft2 soft3 ,然后用策略路由#ip rule add from 192.168.50.0/24 table outwall prio 1 或者干脆把相应的接口直接安装到特定的虚拟机里,原则上 xp 也是没问题的,太古董了没操作过。。。 linux ip route 策略路由不怎么熟悉,大体是这样。 softether 我已经好久没在国内网络用过了,担心穿墙时是否会被挡。

Softether on VPS Using Local Bridge
http://blog.lincoln.hk/blog/2013/05/17/softether-on-vps-using-local-bridge/
Build a LAN-to-LAN VPN (Using L3 IP Routing)
https://www.softether.org/4-docs/1-manual/A._Examples_of_Building_VPN_Networks/10.6_Build_a_LAN-to-LAN_VPN_(Using_L3_IP_Routing)
技术不值钱,我是听谁说的,说的最多的就是花钱买技术,大公司不都这样周而复始的兼并吗。

很多东西点破不值钱,所以不得不说有些技术很容易被复制,然后就不值钱了。。。
2015 年 12 月 18 日
回复了 fang2hou 创建的主题 › VPS › 问 2 个 VPS 租用的问题
最划算的方案是国内家里申请个 100mbps 宽带,如果有 10mbps 的上行也比买 vps 划算,有公网 ip 最好,没有然后了肯定比什么云都便宜。再放个 openwrt 路由装个 stunnel+softether 什么都解决了。
2015 年 12 月 18 日
回复了 Wowbeing 创建的主题 › VPS › 如何在 VPS 中建立给他人用的 SSH 账号用于 http 代理?
现在没什么人用 ssh 吧,最近的网络烂得,烂得到处是丢包,平时 ssh 操作都要哭了,但别提大流量。

ssh 只有一家 P 开头的而且用的还是 udp53 ssh 版本还是一个经过混淆的需要特殊的客户端才能连接。平时用 stunnel 多点,可惜手机端支持差了点,官方提供的 android 版本我都没在 x86 设备上加载成功过。 windows,openwrt 倒都有客户端。现在没好的工具翻墙各种困难。

基本服务器端
cert = /stunnel.pem
[SOCKS Server]
;PSKsecrets = /da/stunnel/secrets.txt
accept = :::1723
protocol = socks

客户端

client = yes
[server1]
accept = 127.0.0.1:1081
connect = xxx.xxx.xxx.xxx:1723
基础太差。。。很多东西理解起来也困难。

原先就是看了这篇文档以为很简单,结果还是有很多特定环境的限制,包括 ipv4+ipv6 环境,服务器不支持 ip6tables -t nat ,需要禁用 AAAA 查询,还包括 iproute2 的一些无底坑,这些坑在官方文档中都没有任何提及。
OpenWrt VPN 按域名路由
https://blog.sorz.org/p/openwrt-outwall/

redsocks2 原先在 openwrt 下面配置成功过,可是 vps 。。。反正在透明代理这块基本上网上能找到的实例,命令打一遍最终没效果,也不知道坑在哪里。。。

所以最终用 softether vpn ,这东东无比的强大,它本身就有虚拟网卡实现,最终基本甚至没用到任何的虚拟 L3 路由功能。目前实现的效果就是 就近访问日本 vps , vps 中一部分 youtube 流量中转的是美国 vps 上的流量,所以跟你想要实现的效果差不多。自己多试几遍吧,回头看看还是挺简单的,但是可扩展效果比透明代理好多了。实例虽然是用 dnsmasq ipset 特定域名,其实可以实现建立 ipset -N outwall4 nethash ,然后直接写路由表。

vpn 采用 softether vpn server
服务器端
创建虚拟 HUB server/管理虚拟 HUB/并添加用于客户端连接用的 管理用户
本地网桥设置 /将虚拟 HUB server 选择创建的类型 新 tap 设备的桥接,并输入设备名称 soft1
ifconfig tap_soft1 192.168.60.100
ifconfig tap_soft1 mtu 1392
添加 ipv6 地址,只是为了以后不需要改动服务器配置所以固定一个地址
ip address add fe80::4ac:20ff:fe9c:1000/128 dev tap_soft1
#ip address del fe80::4ac:20ff:fe9c:1000/128 dev tap_soft1

客户端
创建虚拟 HUB client/管理虚拟 HUB/管理级联连接 创建到服务器端的连接
本地网桥设置 /将虚拟 HUB client 选择创建的类型 新 tap 设备的桥接,并输入设备名称 soft1
ifconfig tap_soft1 192.168.60.200
ifconfig tap_soft1 mtu 1392
#ip address add fe80::4ac:20ff:fe9c:2000/128 dev tap_soft1
#ip address del fe80::4ac:20ff:fe9c:2000/128 dev tap_soft1

如果能互相 ping 通 vpn 连接已经没有任何问题。
ping 192.168.60.100
ping6 -I tap_soft1 fe80::4ac:20ff:fe9c:1000


* 2015 年 12 月 14 日星期一
- [bash] iptables iproute2 and multiple routes
http://aftermanict.blogspot.it/2015/11/bash-iptables-iproute2-and-multiple.html
- 今天按这篇文档一路设置下来第一次用 fwmark 成功设置路由,由于服务器并没有 ip6table_nat 模块,所以仅能使用 iptable_nat
- 另外似乎设置的 set-mark 3 和原先的 QOS 标记有冲突,只有在 iptables -t mangle -F 清空原先的标记时才有效果,应该是能解决的
- 这次设置最成功的地方在于不会有 vpn 客户端拔号时出现因为接口的问题而无法访问网络
- 另外第一次注意到 iptabes 的全局 ACCEPT 并不是万能的,像此例必须指定特定接口的 MASQUERADE 才可以成功。
/etc/sysctl.conf
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
net.ipv4.ip_forward = 1

for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 0 >| $f ; done

iptables -I OUTPUT -o eth0 -p udp --dport 53 -m string --hex-string "|07|youtube|03|com|00001c|" --algo bm -j DROP

dnsmasq.conf
ipset=/youtube.com/outwall4,outwall6

iptables-restore /da/fw
ipset destroy outwall6
ipset -N outwall6 iphash family inet6
ipset destroy outwall4
ipset -N outwall4 iphash

##echo "200 outwall" >> /etc/iproute2/rt_tables
ipset -L outwall4 >/tmp/outwall4.tmp
for i in `sed -n "7,$ p" /tmp/outwall4.tmp`;do echo $i;ipset -D outwall4 $i;done
kill -HUP $(pidof dnsmasq)
nslookup www.youtube.com
nslookup m.youtube.com
nslookup youtube.com
#ipset 需要 dnsmasq 通过本地像 192.168.40.253:53 进行查询,直接外部 dns 服务器会没结果
ipset -L outwall4
iptables -t mangle -D PREROUTING -m mark --mark 0x0/0xff00 -m set --match-set outwall4 dst -j MARK --set-xmark 0xfe00/0xff00
iptables -t mangle -D OUTPUT -m mark --mark 0x0/0xff00 -m set --match-set outwall4 dst -j MARK --set-xmark 0xfe00/0xff00
iptables -t mangle -I PREROUTING 2 -m mark --mark 0x0/0xff00 -m set --match-set outwall4 dst -j MARK --set-xmark 0xfe00/0xff00
iptables -t mangle -I OUTPUT -m mark --mark 0x0/0xff00 -m set --match-set outwall4 dst -j MARK --set-xmark 0xfe00/0xff00
##ip route add 192.168.40.0/24 via 192.168.30.254 dev tap_soft
ip route flush table outwall
ip route add default via 192.168.30.254 dev tap_soft table outwall
#ip route add 192.168.40.0/24 via 192.168.30.254 dev tap_soft table outwall
ip rule del table outwall
ip rule add fwmark 0xfe00/0xff00 table outwall prio 1
#ip rule add from 192.168.50.0/24 table outwall prio 1
ip route flush cache

iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o vpns+ -j MASQUERADE
iptables -t nat -A POSTROUTING -o tap_soft -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


- 调整了原先的 qos 标记为 0x00/0xff ,路由标记为 0xfe00/0xff00,如果标记为 0xff00/0xff00 则变为 or 标记。注意使用 iptables -I 将规则放在最前面。有关 iptables xmark 的描述看不懂,有人说可以把不同的 mask 看成是 subnet 。
- qos-scripts currently uses the last 8 bits to mark traffic e.g.-j MARK --set-xmark 0x44/0xff
whereas multi-wan uses the next 8 bits (0xff00) to mask its marks:

http://ww2.sinaimg.cn/large/0060lm7Tgw1ez3lyv5dxgj30ty0nln42.jpg
http://ww4.sinaimg.cn/large/0060lm7Tgw1ez3m3qfm0xj30i00glq5o.jpg
2015 年 12 月 18 日
回复了 t895 创建的主题 › 宽带症候群 › CN2 香港,还需要锐速吗?
自己申请一个装一下吧,很快的,由于是 tcp 加速,一些本来网络就慢的像 ocserv 就必须屏蔽掉 udp 端口,这个效果好像跟 netspeeder 相反,以前搬瓦工的空间虽然 tcp 受限可是 udp 依然很快,说不清是软件问题还是空间问题,但是有一点可以肯定它不会像 netspeeder 会导致很多网络问题。
目前怀疑假如电信在客户端做了发包限速,那么装这种多倍发包可能有效果。至于跟 tc 的配合,服务器上也装了个动态限速实现,所有 output 方向 rate 200kbps ceil 500kbps ,看 youtube 最大的感受,缓冲稳定,缓冲条很长时并不会以最大速度缓冲,而是停滞,以前没装过锐速的好像是一直缓冲到底,然后继续缓冲。也就是全程以一种极低的速率开始缓冲。
无法做更多的测试,我用的网络好像有问题,即便看 720p 有极高的缓冲速率,切换成 1080p 就开始掉速率。
10mbps 100 人用带宽太低了,以前在公司时考虑再三最后动态限制高速用户,即时插入 connbytes 5 秒抓取平均速率 100kb/s 的用户,最高的一次限制 10 个 ip ,也就是 10 人用掉了 1000kb 还有 90 人还有 500kb 的剩余带宽可用。。。我想真正有点效果的是 sfq 算法。 burst 在磊科的固件宣传得更多,这个东东应该是专门测试过的,不知道什么原因一直没用过,可能有某种环境特定限制。如果还想再榨取用户带宽,可以分别对 tcp 80 443 和其它端口做 iptables limit 限速,用户能感受到 80 443 的快慢,却无法体会到其它端口的快慢。 limit 最大特点流量随着发包限制动态变化,通常用户不会觉得是服务器端的问题。
2015 年 12 月 17 日
回复了 t895 创建的主题 › 宽带症候群 › CN2 香港,还需要锐速吗?
是 10MB/s 还是 10mbps 。 10mbps 带 100 难度还是极高的。以前公司一根 1.4MB/s 的专线网络繁忙时剩余带宽只有 30kb/s ,过小的带宽难于平均。 tc 负载均衡不知道什么东东没听说过,网上流传的小包没怎么测试过,应该 tomato 那个 /etc/qos 那 5 句 tc 更正宗。
锐速效果显著,但要随便就跑光上行就没什么必要再装了,可能有反作用。这东西按描述是多倍发包解决一路上的丢包问题,现在用电信的网络就出现过流量反复波动从快到慢,又从慢到快的效果,不知道是否有做了 iptables limit 匹配每秒数据包通过,其实自己装一下就是了,目前测试下来基本没网络异常情况,免费版有 20mbps 限制,关键多人环境流量不知道是否会浪费更多。
2015 年 12 月 17 日
回复了 gdtv 创建的主题 › 问与答 › 为什么电脑整机不能买?
曾经给机房买过 60 套 i5 ,价格是参考易迅价格。集团采购部比较坑,非得指定供应商。当时供应商就反复要求换这换那,去过电脑城的朋友都知道,一定得坚持不换。但是最后还是说给换上更好的风扇,哈哈没经验的我竟然答应了。本来是盒装 cpu 4 针可调速原装风扇,变成 3 针永远那转速的好像是九州风神,真正的问题是盒装 cpu 变成散装 cpu 是有差价的,虽然用起来都一样。。。
stunnel 有个 socks vpn 透明代理实现,可以说所有的透明代理实例都没配置成功过。

参考别人的 vpn 分流,差不多花了半个月才解决,很多文档转载转载再转载,很多关键步骤都遗漏了,这篇文档的 systl.conf 和 MASQUERADE 也是零星散步在网络论坛讨论中。
http://aftermanict.blogspot.it/2015/11/bash-iptables-iproute2-and-multiple.html
这些都是 atheros 芯片的特有命令,没戏的。好久不用 tomato 了,建议使用 openwrt 好点,因为有时候一些特殊的命令可能会被精简掉。对于信号判断现在脑袋没一点印象,一般到 /usr/bin /usr/sbin 看看有没有带 wl iwpriv wirelss 之类的命令看是否有客户端信号强度输出,然后再根据 SNR 值判断一下就可以了。

这是针对 ddwrt build 14929 之前版本的,之后的就不存在 iwpriv 命令了,而且这些都是 athroes 芯片特有的命令,基本原理差不多,通过 SNR 判断客户端信号强度,然后将客户端加入黑名单然后踢除。

openwrt 通用的踢除命令在 hostpad-utils 包里。

#!/bin/sh
nvram get ath0_maclist > /tmp/ath0_maclist
cat /tmp/ath0_maclist
#for i in `arp -a | cut -d ' ' -f4`;
for i in `wl_atheros $(nvram get ath0_ifname) assoclist | cut -d" " -f2`;
do
ALL_count=$(wl_atheros rssi $i | cut -d"-" -f2)
if [ $ALL_count -gt 10 ] ;then #设置 rssi 多少则条件成立
mac=$i
sed -i "s/$/ $mac/g" /tmp/ath0_maclist
echo "$i rssi: -$ALL_count";
#iwpriv ath0 kickmac $i
fi
done
#rc restart #start stop
cat /tmp/ath0_maclist
1 ... 260  261  262  263  264  265  266  267  268  269 ... 302  
❮ ❯
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2497 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 46ms · UTC 06:59 · PVG 14:59 · LAX 23:59 · JFK 02:59
♥ Do have faith in what you're doing.