找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 10350|回复: 6

[其它] [分享]MikroTik RouterOS™ how to 的翻译第一部分

[复制链接]
发表于 2004-5-26 17:59:19 | 显示全部楼层
MikroTik RouterOS how to目录
文档的版本 27-5-2004
这个文档适用于MikroTik RouterOS V2.7 和 V2.8
        如何保护你的MikroTik RouterOS?
        如何保护你的MikroTik RouterOS 是从used as Spam Relay开始的?
        如何使你的家用网路连接到 xDSL ?
        H如何使用透明的桥连接两个网路?
        如何从从一个当地的网络连接到外部公共的地址?
        How to Apply Different Treatment for Oversea Traffic?
        How to Build a Transparent Traffic Shaper?
        How to Configure Router to Send E-mails When Power Failure has Occured?
        How to bind HotSpot usernames with their IP addresses?
        How to use Peer-to-Peer filtering and PCQ queueing?
        How to make a Wireless Bridge, using WDS?
如何保护你的 MikroTik RouterOS?
保护你的 MikroTik RouterOS 不应该只是改变你的管理员的密码而且还要建立IP信息包过虑。 所有的信息包到达目标都是路由器处理的依靠IP防火墙 input 链路. 注意, 那个正经由路由器转发的信息包输入的链路不影响。
你可以添加下列防火墙规则 /ip firewall rule input (正好'剪切和粘贴' 到路由器正在使用的终端控制台或使用winbox 配置的相关的意见):
/ip firewall rule input
add protocol=tcp connection-state=established
    comment="Established TCP connections"
add protocol=tcp connection-state=related
    comment="Related TCP connections"
add protocol=udp
    comment="UDP"
add protocol=icmp
    comment="ICMP ping"
add protocol=89
    comment="Allow OSPF"
add src-addr=10.0.0.0/24
    comment="From our office network. Edit this!"
add src-addr=192.168.0.0/24 protocol=tcp dst-port=8080
    comment="This is web proxy service for our customers. Edit!"
add action=drop log=yes
    comment="Log and drop everything else"
使用 /ip firewall rule input print packets命令可以看到许多依靠这种规则处理过的信息包。使用 reset-counters 命令可以重启上面的统计信息。 检查系统的记录文件 /log print 查看已经被记录的信息包。
你需要包含附加的规则允许来自其它主机的访问, etc.
防火墙规是它们在在这个列表中出现的次序种处理的。后来一条和规则匹配的信息包,没有更多的规则被它处理。以后添加新的规则, 移除规则在他们的上层菜单使用move 命令。
查看 MikroTik RouterOS 手册会有更多的资料。
http://www.mikrotik.com/documentation.html
top
如何保护你的MikroTik RouterOS 是从used as Spam Relay 开始的?
保护你的MikroTik RouterOS from being used as spam relay 你会有:
1.        保护你的路由器使用的防火墙规则。如何看关于它的章节!
2.        配置WEB代理访问列表。
WEB 代理访问列表使用以下命令配置的 /ip web-proxy access.例如, 添加下列规则允许确定的主机访问你的路由器 (正好'剪切和粘贴' 到路由器正在使用的终端控制台或使用winbox 配置的相关的意见):
/ip web-proxy access
add src-address=192.168.0.0/24
    comment="Our customers"
add dst-port=23-25 action=deny
    comment="Deny using us as telnet and SMTP relay"
add action=deny
    comment="Deny everything else"
注意, 首先你应该有允许可靠的服务的规则,和最后一条规则总是拒绝其它的任何访问。 防火墙规是它们在在这个列表中出现的次序种处理的。后来一条和规则匹配的信息包,没有更多的规则被它处理。以后添加新的规则, 移除规则在他们的上层菜单使用move 命令。
查看 MikroTik RouterOS 手册会有更多的资料。
http://www.mikrotik.com/documentation.html
top
如何使你的家用网路连接到xDSL?
你已经安装好了家用的 DSL modem ,而且有一个从你的家用网路到Internet 的安全的连接。为了这个,你必须在你的家用网路和DSL modem 之间安装MikroTik路由器:

以下几步是允许你的家用了网路连接到 xDSL :
1.        用两块以太网卡来装配你的 MikroTik 路由器,一个是连接到你的家用 DSL modem, 另一个是连接到你的家用网路的。在基本的安装先导中查看基本的说明。
2.        当正在安装时, 确信你安装了dhcp 软件包.
3.        允许两个接口, 例如:
4.        /interface enable ether1,ether2
5.        配置 DHCP 客户端在这个与外部相连的接口 (xDSL)上使用为你提供服务者给你的 IP 。
6.        /ip dhcp-client set enabled=yes interface=ether1
7.        检测, 如果你有收到IP配置使用lease print 命令, 例如:
8.        [admin@MikroTik] ip dhcp-client> lease print
9.                  address: 81.198.16.4/21
10.                  expires: may/10/2001 04:41:49
11.                  gateway: 81.198.16.1
12.              primary-dns: 195.13.160.52
13.            secondary-dns: 195.122.1.59
14.        [admin@MikroTik] ip dhcp-client>                                          
15.        在你的 Ether2 接口上添加你的私有网路的IP 地址, 例如:
16.        /ip address add address=192.168.0.1/24 interface=ether2
17.        配置你当地网路的防火墙:
18.        /ip firewall src-nat add out-interface=ether1 action=masquerade  
19.            comment="Masquerades everything leaving the external interface"
20.        Configure firewall to protect your router:
21.        /ip firewall rule input
22.        add protocol=tcp connection-state=established
23.            comment="Established TCP connections"
24.        add protocol=tcp connection-state=related
25.            comment="Related TCP connections"
26.        add protocol=udp
27.            comment="UDP"
28.        add protocol=icmp
29.            comment="ICMP ping"
30.        add src-addr=192.168.0.0/24
31.            comment="From my Home Network"
32.        add action=drop log=yes
33.            comment="Log and drop everything else"
34.        (可选的)在输出到你的家用网路的接口 IP上配置 DHCP 服务:
35.        /ip pool add name=private ranges=192.168.0.2-192.168.0.254
36.        /ip dhcp-server add name=home interface=ether2 lease-time=3h
37.         address-pool=private netmask=255.255.255.0 gateway=192.168.0.1
38.            dns-server=195.13.160.52,195.122.1.59 domain="mail.com"
39.        /ip dhcp-server enable home
那是它! 你能从你的家用网路访问Internet.
查看 MikroTik RouterOS 手册会有更多的资料。
http://www.mikrotik.com/documentation.html
top
如何使用桥联接两个网路?
在MikroTik RouterOS中远程的网路能够很容易的使用桥接中的(EoIP)特征.
我们将展示这种情况,当网路通过Atheros 无线接口连接。然而, 这个例子可以延伸出许多的其它类型的接口, 像 PPTP, CISCO/Aironet, Prism.
让它承担下列网路设备:

下面遵从的步骤是创建透明的网桥时使用 EoIP 接口:
1.        确信你和MikroTik 路由器之间已经连通, i.e., 一个路由器配置成(AP)服务器, 另一个时客户端(工作站):
2.        [admin@AP] > interface wireless set wlan1 mode=bridge ssid=mikrotik
3.        ... disabled=no
4.       
5.        [admin@Station] interface wireless> print
6.        [admin@Station] interface wireless> set wlan1 mode=station ssid=mikrotik
7.        ... disabled=no
8.        确信这个Make sure the IP configuration is correct, and you can access one router from the other one:
9.        [admin@AP] > ip address add address=10.1.0.1/24 interface=wlan1
10.       
11.        [admin@Station] > ip address add address=10.1.0.2/24 interface=wlan1
12.       
13.        [admin@Station] > ping 10.1.0.1
14.        10.1.0.1 64 byte pong: ttl=64 time=1 ms
15.        10.1.0.1 64 byte pong: ttl=64 time=1 ms
16.        2 packets transmitted, 2 packets received, 0% packet loss
17.        round-trip min/avg/max = 1/1.0/1 ms
18.        [admin@Station] >
19.        Add EoIP tunel interfaces:
20.        [admin@AP] > interface eoip add remote-address=10.1.0.2 tunnel-id=1 disabled=no
21.       
22.        [admin@Station] > interface eoip add remote-address=10.1.0.1 tunnel-id=1
23.        ... disabled=no
24.        Add bridge interfaces:
25.        [admin@AP] > interface bridge add forward-protocols=ip,arp,other disabled=no
26.       
27.        [admin@Station] > interface bridge add forward-protocols=ip,arp,other
28.        ... disabled=no
29.        Select interfaces for bridging:
30.        [admin@AP] > interface bridge port set ether1,eoip-tunnel1 bridge=bridge1
31.       
32.        [admin@Station] > interface bridge port set ether1,eoip-tunnel1 bridge=bridge1
Note, that connection is lost to the router if you are connected through 'ether1'.
33.        Move the IP addresses from Ethernet to bridge interfaces:
34.        [admin@AP] ip address> set [find interface=ether1 ] interface=bridge1
35.        [admin@AP] ip address> print
36.        Flags: X - disabled, I - invalid, D - dynamic
37.          #   ADDRESS            NETWORK         BROADCAST       INTERFACE
38.          0   10.0.0.215/24      10.0.0.0        10.0.0.255      bridge1
39.          1   10.1.0.1/24        10.1.0.0        10.1.0.255      wlan1
40.        [admin@AP] ip address>
41.       
42.        [admin@Station] ip address> set [find interface=ether1 ] interface=bridge1
43.        [admin@Station] ip address> print                                                                                    
44.        Flags: X - disabled, I - invalid, D - dynamic
45.          #   ADDRESS            NETWORK         BROADCAST       INTERFACE                                                   
46.          0   10.0.0.216/24      10.0.0.0        10.0.0.255      bridge1                                                     
47.          1   10.1.0.2/24        10.1.0.0        10.1.0.255      wlan1                                                   
48.        [admin@Station] ip address>
现在你可以通过'ether1'再一次的连接到你的路由器which belongs to 'bridge1' 。
测试这个桥接通过 pinging 从10.0.0.215 to 10.0.0.216. 注意, 这个桥需要10-30秒10...30s 才可以学习到地址和开始经过的通路路径.。
同样的你你能创建透明的桥如果你有 prism 或 CISCO/Aironet 接口, 或加密的PPTP 隧道。然而, 这 EoIP 隧道能够在两个MikroTik 路由器之间被确定的。
查看 MikroTik RouterOS 手册会有更多的资料。
http://www.mikrotik.com/documentation.html
routeros
回复

使用道具 举报

发表于 2007-8-12 16:59:26 | 显示全部楼层
不错的,感谢了,
routeros
回复

使用道具 举报

发表于 2008-9-8 12:10:48 | 显示全部楼层
感谢,正需要xDSL这个。
routeros
回复

使用道具 举报

发表于 2008-9-23 13:40:58 | 显示全部楼层
又增加了自己的知识了啊
routeros
回复

使用道具 举报

发表于 2009-2-27 17:11:45 | 显示全部楼层
xxxxxxxxxxxxxxxxxxxxxxxxx
routeros
回复

使用道具 举报

头像被屏蔽
发表于 2009-7-4 11:42:11 | 显示全部楼层
不错!
routeros
回复

使用道具 举报

发表于 2009-7-30 15:45:47 | 显示全部楼层
完全没看明白!!
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-6-1 17:16 , Processed in 0.164663 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表