Posts

交叉编译ipset-dns给RT-N66U使用

有人推上联系我让我编译一个ipset-dns给RT-N66U使用,去作者主页看了一下,dnsmasq已经内置ipset功能了,而且最新的tomato的dnsmasq也已经可以直接使用ipset。2015-01-08_21-21-32

某人后来说他用的是Asuswrt-Merlin固件,dnsmasq不完整。我就尝试着自己编译一个ipset-dns。

n2n vpn 设置流水账

公司外网60.1xx.xx.xx,内网172.16.xx.xx,下接路由器,局域网192.168.10.xx,IPPBX地址192.168.10.250。局域网中一台R200跑debian,地址192.168.10.2。 debian中: svn co https://svn.ntop.org/svn/ntop/trunk/n2ncd n2n make install edge -a 10.0.10.1-c test -k test -l 1xx.xx.xx.xx:2xxx -r iptables -t nat -A POSTROUTING -s 10.0.10.0/24-o eth0 -j MASQUERADE iptables -A FORWARD -s 10.0.10.0/24-j ACCEPT 修改/etc/sysctl.conf里的ipv4 forward字段值 net.ipv4.ip_forward=1 windows中: 下载http://www.vpnhosting.cz/n2nguien.exe ping通10.0.10.1即可进行下一步 route add 192.168.10.0mask 255.255.255.0192.168.10.1 <p> 测试192.168.10.250是否可以ping通 </p> <p> tomato设置待补<a title="https://www.

QNAP TS-421启用SMB 2.0(同样适用于TS-419等)

[~] #uname -a Linux QNAP 3.4.6#1Thu Dec 1902:59:16CST 2013armv5tel unknown [~] #smb2status smbd (samba daemon)Version 3.6.18smbd (samba daemon)is running.max protocol SMB 1.0enabled.[~] #grep protocol /etc/smb.conf max protocol =NT1 [~] #smb2enable Shutting down SMB services: smbd nmbd.Shutting down winbindd services: winbindd.max protocol SMB 2.0...enabled.locks pathwas setto /share/HDA_DATA/.locks Starting winbindd services:StartingSMB services:.smbd (samba daemon)Version 3.6.18smbd (samba daemon)is running.max protocol SMB 2.0enabled. <p> 有人反映启用SMB2.0后速度下降很厉害,可以用&#8217;smb21enable&#8217;启用SMB2.1。不过启用SMB2.1后,cpu占用会比SMB1和SMB2.0高,至于速度,有人说在这个级别的硬件上面会跟SMB1相同。 </p>

tomato 中编译安装shadowsocks-libev

废话不多说了,下载源码: https://github.com/madeye/shadowsocks-libev

直接编译会出错:

/tmp/cciqCfzf.s: Assembler messages: /tmp/cciqCfzf.s:2903: Error: opcode not supported on this processor: mips1 (mips1) `sync'

<p>
  修改 \shadowsocks-libev-master\libev 下的 ev.c :(其实跟<a href="http://www.wikai.info/2012_12_1365.html" target="_blank">RT-N66U+tomato编译安装gevent及pyOpenSSL</a> 中gevent的修改是一样的)
</p>

<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:d7602a13-cb17-4684-b5dd-d8c3cb4024f0" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px">
  <pre style=" width: 640px; height: 130px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><div>

<!–

Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/

–>

找到 #define ECB_MEMORY_FENCE asm volatile (sync : : : memory) 改为 #define ECB_MEMORY_FENCE asm volatile (.set mips2; sync; .set mips0 ::: “memory”) 有两处,都改吧。

  <p>
    <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div> 

    <p>
      
    </p>

    <p>
      然后用以下参数编译:
    </p>

    <div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:badb61cd-333e-4859-a56c-c4313a1ce56f" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px">
      <pre style=" width: 640px; height: 100px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><div>

<!–