| MONO对ARP! |
| 作者:佚名 文章来源:本站原创 点击数: 更新时间:2006-8-21 15:08:24 |
|
|
|
|
|
|
一、请看我的config.xml中<system></system>的设置(注意看<shellcmd></shellcmd>)
<?xml version="1.0"?> <m0n0wall> <version>1.6</version> <lastchange>1134199500</lastchange> <system> <hostname>m0n0wall</hostname> <domain>local</domain> <dnsserver/> <dnsallowoverride/> <username>admin</username> <password>$1$2xGLA75j$W/jiJc00HYBZX7kFjxjQv0</password> <timezone>Etc/UTC</timezone> <time-update-interval>300</time-update-interval> <timeservers>pool.ntp.org</timeservers> <webgui> <protocol>http</protocol> </webgui> <shellcmd>ifconfig rl0 -arp </shellcmd> <shellcmd>arp -s 192.168.0.253 00:0f:3d:a0:81:00 </shellcmd> <shellcmd>arp -s 192.168.1.18 00:0A:EB:3D:27:2F </shellcmd> </system> <interfaces> <lan> <if>rl0</if> <ipaddr>192.168.0.100</ipaddr> <subnet>16</subnet> <media/> <mediaopt/> </lan> <wan> <if>rl1</if> <mtu>1500</mtu> <blockpriv/> <media/> <mediaopt/> <ipaddr>XXX.XXX.XXX.XXX</ipaddr> <subnet>XX</subnet> <gateway>XXX.XXX.XXX.XXX</gateway> <spoofmac>XX:XX:XX:XX:XX:XX</spoofmac> </wan> </interfaces> <staticroutes/> <pppoe> </pppoe> <pptp> </pptp> <bigpond> </bigpond> <dyndns> <type>dyndns</type> <username/> <password/> <host/> <mx/> <server/> <port/> </dyndns> <dnsupdate/> <dhcpd> <lan> <range> <from>192.168.1.100</from> <to>192.168.1.199</to> </range> </lan> </dhcpd> <pptpd> <mode/> <redir/> <localip/> <remoteip/> </pptpd> <dnsmasq> <enable/> </dnsmasq> <snmpd> <syslocation/> <syscontact/> <rocommunity>public</rocommunity> </snmpd> <diag> <ipv6nat> <ipaddr/> </ipv6nat> </diag> <bridge/> <syslog/> <nat/> <filter> <rule> <type>pass</type> <descr>Default LAN -> any</descr> <interface>lan</interface> <source> <network>lan</network> </source> <destination> <any/> </destination> </rule> </filter> <shaper/> <ipsec/> <aliases/> <proxyarp/> <wol/> </m0n0wall>
二、说明 1.蓝色部份:<shellcmd>ifconfig rl0 -arp </shellcmd> 利用ifconfig命令来禁止mono路由器内网网卡(其中rl0为内网网卡设备名)发送arp请求 注:如果不使用此命令,则必须建立子网中所有IP的IP和MAC 对应表,如果你的内网网络是:192.168.0.0/255.255.0.0的,你能一个一个建完的话,我真服了你
2.红色部份:略 内网 IP和MAC绑定,也就是建立内网的ARP静态表(IP和MAC对应表)。 我这里只允许192.168.1.18和192.168.0.253这两个IP通过mono上网。
三、修改好config.xml后 Diagnostics→Backup/Restore→Restore configuration栏目(Backup configuration为备份config.xml)→选中修改好config.xml→Restore configuration(点下)就可以了
四、客户机要绑定网关才能上网 我的(网关)mono内网IP地址为:192.168.0.100,MAC为:00-0a-eb-a0-33-59 那么就要在客户机上运行:arp -s 192.168.0.100 00-0a-eb-a0-33-59 后才能上网
|
| 文章录入:zyydaolang 责任编辑:zyydaolang |
|
上一篇文章: 从网络安装m0n0,同时也是VMWARE安装的一个好方法 下一篇文章: m0n0wall的PPTP Server设置 |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |