系列教程 routeros简明设置(官方翻译)
如何设置routeros 文档版本: 应用于:
属性描述 要保护你的mikrotik routeros™, 你不应该只是修改你的admin的密码,还需要设置数据包的过滤,所以目的地到路由器的数据包需要在一次经过ip firewall的input链表处理。注意input链表不会去**通过路由器的传输数据。 你可以添加下面的规则到/ip firewall rule input (只需要通过'copy 和paste'到路由器的terminal console(终端控制台)或 在winbox中配置相关的参数): /ip firewall rule input add connection-state=invalid action=drop \ comment="drop invalid connections" /ip firewall rule input add connection-state=established \ comment="allow established connections" /ip firewall rule input add connection-state=related \ comment="allow related connections" /ip firewall rule input add protocol=udp comment="allow udp" /ip firewall rule input add protocol=icmp comment="allow icmp ping" /ip firewall rule input add src-address=10.0.0.0/24 \ comment="allow access from our local network. edit this!" /ip firewall rule input add src-address=192.168.0.0/24 protocol=tcp dst-port=8080 \ comment="this is web proxy service for our customers. edit this!" /ip firewall rule input add action=drop log=yes \ comment="log and drop everything else" 使用/ip firewall rule input print packets 命令可以看到有多少个数据包被里面的规则处理过。使用reset-counters 命令去复位统计值。检查系统日志文件通过/log print可以看到数据包被丢弃的信息。 你可能需要在里面添加允许来至确认主机的访问。例如:记住出现在列表中的防火墙规则在命令中被处理。一个规则匹配的数据包,不会被之后其他的规则处理。添加了新的规则后,如果想优先被处理,通过move命令移动到所以规则之上。 怎样保护你的mikrotik routeros™ 从来至 spam的请求 description to protect your mikrotik routeros™ from being used as spam relay you have to: 保证你的路由器使用了防火墙规则。 see the how to section about it! /ip web-proxy access add src-address=192.168.0.0/24 \ comment="our customers" /ip web-proxy access add dst-port=23-25 action=deny \ comment="deny using us as telnet and smtp relay" /ip web-proxy access add action=deny \ comment="deny everything else" 注意,允许确认服务首先你应该由规则,并且在规则的最后通常为拒绝任何的访问。 如何连接你的家庭网络到xdsl? 属性描述 确认你的家用dsl modem以安装好,并想通过一个安全的方式将你的家庭网络连接到internet,首先你需要安装mikrotik路由器在dsl modem和你家庭网络中间:
首先你的mikrotik路由器有两张以太网卡,一个对应家庭的dsl modem ,一个对应你的家庭网络。 配置dhcp客户端在对外的接口上(xdsl) 接收来至ip配置的服务: 检查,如果你收到ip配置信息后使用lease print,如下: address: 81.198.16.4/21 expires: may/10/2001 04:41:49 gateway: 81.198.16.1 primary-dns: 195.13.160.52 secondary-dns: 195.122.1.59 [admin@mikrotik] ip dhcp-client> 添加你的私有网络地址到ether2网卡上,如下: 在你的本地网络配置伪装: 配置防火墙保护你的路由器: comment="drop invalid connection packets" /ip firewall rule input add connection-state=established \ comment="allow established connections" /ip firewall rule input add connection-state=related \ comment="allow related connections" /ip firewall rule input add protocol=udp comment="allow udp" /ip firewall rule input add protocol=icmp comment="allow icmp ping" /ip firewall rule input add src-address=192.168.0.0/24 \ comment="from my home network" /ip firewall rule input add action=drop log=yes \ comment="log and drop everything else" (可选)配置dhcp服务散发ip配置到你的家庭网络中去: /ip dhcp-server network add gateway=192.168.0.1 address=192.168.0.0/24 \ dns-server=195.13.160.52,195.122.1.59 domain="mail.com" (责任编辑:admin) |