【问题标题】:mikrotik: route all traffics of particular local ip to defined gateway [closed]mikrotik:将特定本地 ip 的所有流量路由到定义的网关 [关闭]
【发布时间】:2013-07-07 17:04:51
【问题描述】:

我正在使用 Mirkotik RB 1100 v6.0rc11。

我的网络有这样的配置
LAN
以太1 192.168.0.0/24

ISP1
以太6 PPPOE 连接
动态公共 IP 地址

ISP2
以太10 静态公共 IP
111.111.111.111/25

我将本地 ip 即 192.168.0.0/24 伪装成 ISP2。所有本地 ip 使用 ISP2 互联网浏览网页。

我想要 192.168.0.50192.168.0.51,从 ISP1 浏览互联网。

请帮忙。

【问题讨论】:

    标签: routing mikrotik


    【解决方案1】:

    这是我的回答:

    1. 创建地址列表:

      ip firewall>address-list> add comment="samme comment" address=192.168.0.50-192.168.0.51 list=list50-51

    2. 创建 mangle:

      ip firewall mangle> add comment="same comment" chain=prerouting action=mark-routing new-routing-mark=INTERNET-50-51 src-address-list=list50-51

    3. 创建路线:

      ip route> add comment="same comment" dst-address=0.0.0.0/0 routing-mark=INTERNET-50-51 gateway=ISP1的IP

    4. 创建 nat

      ip firewall>nat> add comment="same comment" chain=srcnat action=masquerade src-address-list=list50-51 dst-address=0.0.0.0/0 out-interface=ISP1(PPPOE)接口

    【讨论】:

    • 你拯救了我的一天,最好的答案
    【解决方案2】:

    为这 2 个 IP 地址创建一个地址列表。 NAT 规则表是级联的,因此您应该为您的地址列表创建一个源 NAT 规则并将其放在列表的上层。

    【讨论】:

    • 不清楚..你能详细说明一下吗
    • /ip firewall address-list add address=192.168.0.50 list=2ISP1 add address=192.168.0.51 list=2ISP1 /ip firewall nat add action=masquerade chain=srcnat out-interface=Ether6 src- address-list=\ 2ISP1 add action=src-nat chain=srcnat out-interface=Ether10 src-address=192.168.0.0/24 to-addresses=111.111.111.111
    • 另一种方法是使用 mangles 将交通路线与连接标记和路由标记分开
    猜你喜欢
    • 2023-03-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-19
    • 2019-02-04
    • 1970-01-01
    • 2015-06-24
    相关资源
    最近更新 更多