文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>linux下的DNS转发

linux下的DNS转发

时间:2007-06-06  来源:dtlchm

 

好久没配过DNS了,今天又费了点劲搞定了,记下来。   1.在/etc/named.conf 的options字段增加    options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
         // query-source address * port 53;
        forwarders {192.168.0.1;192.168.1.22;};
};
  2.写配置脚本   #!/bin/bash   #打开转发
  echo 1 > /proc/sys/net/ipv4/ip_forward
  #加载模块   /sbin/modprobe iptable_filter
  /sbin/modprobe ip_tables
  #/sbin/modprobe iptables_nat
  #刷新规则
  /sbin/iptables -t nat -F
  #新规则   /sbin/iptables -t nat -A POSTROUTING -s 192.168.29.0/255.255.255.0 -j MASQUERADE
相关阅读 更多 +
排行榜 更多 +
开局一个小兵最新版

开局一个小兵最新版

休闲益智 下载
火柴人联盟2腾讯qq登录版

火柴人联盟2腾讯qq登录版

体育竞技 下载
tsuki odyssey游戏(月兔冒险奥德赛)

tsuki odyssey游戏(月兔冒险奥德赛)

休闲益智 下载