• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 電信,網通雙線實戰

    發表于:2007-07-04來源:作者:點擊數: 標簽:
    討論過程很精彩.最后得出的結論. platinum 的總結... 轉platinum 的總結:http://blog.platinum.net.cn/index.php?op=ViewArticlearticleId=59blogId=1 分析過程見地址 http://bbs.chinaunix.net/forum/viewtopic.php?show_type=newp=3547010#3547010 # echo

    討論過程很精彩.最后得出的結論. platinum 的總結...

    轉platinum 的總結:http://blog.platinum.net.cn/index.php?op=ViewArticle&;articleId=59&blogId=1

    分析過程見地址

    http://bbs.chinaunix.net/forum/viewtopic.php?show_type=new&p=3547010#3547010


    # echo "200    DIANXIN" >> /etc/iproute2/rt_table(這個是添加到文件,執行一次即可)
    # ip route replace default via 222.168.1.2 table DIANXIN(replace用來替換默認路由,而不是添加)
    # ip rule add fwmark 1 table DIANXIN(這個注意順序,用ip rule可以查看)
    # iptables -t nat -F
    # iptables -t mangle -F
    # iptables -t mangle -A PREROUTING -i eth0 -s 192.168.0.0/24 -d 222.222.5.0/15 -j MARK --set-mark 1
    # iptables -t mangle -A PREROUTING -i eth0 -s 192.168.0.0/24 -d 222.240.0.0/13 -j MARK --set-mark 1
    # iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 222.222.5.0/15 -j SNAT --to $DIANXIN
    # iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 222.240.0.0/13 -j SNAT --to $DIANXIN
    # iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to $接網通線路網卡的地址
    # ip route flush cache

    這樣的結果,是訪問222.222.5.0/15和222.240.0.0/13走電信網卡、電信路由,偽裝成電信出口地址,其他默認網通

    參考文檔:
    http://iptables-tutorial.frozentux.net/cn/iptables-tutorial-cn-1.1.19.html
    http://www.linuxaid.com.cn/engineer/ideal/article/policy_pouting.htm
    http://bbs.chinaunix.net/forum/viewtopic.php?t=304033&highlight=platinum

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>