15Mar/10Off
在ubuntu上实施西厢计划
准备:在ubuntu software center安装
- autoconf
- automake
- libtool
- iptables dev
终端执行 sudo passwd root 给root设置密码后su切换到root
安装
- 解压缩 tar -xf 下载下来的tar
- ./autogen.sh
- CFLAGS="-O3" ./configure --prefix=/usr
- make
- make install
配置
- 进到extensions目录 cp *.so /lib/xtables
# cd examples # ipset -R < YOUTUBE # ipset -R < GOOGLE # ipset -R < NOCLIP # iptables -A INPUT -p tcp --sport 80 --tcp-flags FIN,SYN,RST,ACK SYN,ACK -m state --state ESTABLISHED -m set --match-set NOCLIP src -j ZHANG # iptables -A INPUT -p tcp --sport 80 -m state --state ESTABLISHED -m gfw -j LOG --log-level info --log-prefix "gfw: " # iptables -A INPUT -p udp --sport 53 -m state --state ESTABLISHED -m gfw -j DROP # echo nameserver 8.8.8.8 > /etc/resolv.conf 丢弃GFW包by marvelliu iptables -I INPUT -p tcp --sport 80 -m state --state ESTABLISHED -m gfw -j DROP 嗯,但是我测试失败了. 不知道是不是和linksys无线路由器有关,tomato的固件. 丢掉gfw包也不行 终端测试结果: jejer@jejer-laptop:~$ nslookup youtube.com Server: 8.8.8.8 Address: 8.8.8.8#53 Non-authoritative answer: Name: youtube.com Address: 74.125.45.100 Name: youtube.com Address: 74.125.67.100 Name: youtube.com Address: 74.125.127.100 jejer@jejer-laptop:~$ ping youtube.com PING youtube.com (74.125.45.100) 56(84) bytes of data. 64 bytes from yx-in-f100.1e100.net (74.125.45.100): icmp_seq=1 ttl=42 time=336 ms 64 bytes from yx-in-f100.1e100.net (74.125.45.100): icmp_seq=2 ttl=42 time=336 ms 64 bytes from yx-in-f100.1e100.net (74.125.45.100): icmp_seq=4 ttl=42 time=339 ms 64 bytes from yx-in-f100.1e100.net (74.125.45.100): icmp_seq=5 ttl=42 time=336 ms 64 bytes from yx-in-f100.1e100.net (74.125.45.100): icmp_seq=6 ttl=42 time=336 ms ^C --- youtube.com ping statistics --- 6 packets transmitted, 5 received, 16% packet loss, time 5011ms rtt min/avg/max/mdev = 336.119/336.838/339.027/1.158 ms

March 27th, 2010 - 08:43
我想在我的惠普笔记本上 实行黑苹果计划, 靠谱不?