Community discussions

MikroTik App
 
bombel
just joined
Topic Author
Posts: 3
Joined: Mon Jan 30, 2017 6:07 pm

Routing between 3 networks

Mon Jan 30, 2017 6:36 pm

Hi guys,
I have a problem. I've got a network like that in the attachment.
My RB1200 (172.10.10.0/24) is connected to our partner office thru IPSEC (192.168.1.0/24). The 172.10.10.0/24 network has access to the 192.168.1.0/24 network and all of the resources.
Now I need to connect the our other office (172.100.100.0/24) to the resources 192.168.1.0/24 . I've managed to connect the RB2011iL and RB1200 routers thru OPENVPN, and everything works 172.100.100.0/24 can see 172.10.10.0/24 network resources and my 172.10.10.0/24 can see the other network as well.
But when set the 192.168.1.0/24 route for (172.100.100.0/24) thru openvpn interface to RB1200 it doesn't work. Could you please direct me what I need to do to communicate those two network thru the RB1200.
Thanks :D
You do not have the required permissions to view the files attached to this post.
 
tr00g33k
Frequent Visitor
Frequent Visitor
Posts: 89
Joined: Sun Mar 29, 2015 3:58 pm

Re: Routing between 3 networks

Mon Jan 30, 2017 9:39 pm

On RB201:
You have to have route for 192.168.1.0/24 that shows to GW 172.10.1.2
You have to have route for 172.10.10.0/24 that shows to GW 172.10.1.2

On Rb1200:
You have to have policy from 172.100.100.0/24 to 192.168.1.0/24
You have to have policy from 172.10.10.0/24 to 192.168.1.0/24
And all proper NO-NAT rules and firewall rules

On office router:
You have to have policy from 192.168.1.0/24 to 172.100.100.0/24
You have to have policy from 192.168.1.0/24 to 172.10.10.0/24
And all proper NO-NAT rules and firewall rules

It would be much easier to help you if you post your configs
 
bombel
just joined
Topic Author
Posts: 3
Joined: Mon Jan 30, 2017 6:07 pm

Re: Routing between 3 networks

Mon Jan 30, 2017 10:46 pm

On RB201:
You have to have route for 192.168.1.0/24 that shows to GW 172.10.1.2
You have to have route for 172.10.10.0/24 that shows to GW 172.10.1.2

On Rb1200:
You have to have policy from 172.100.100.0/24 to 192.168.1.0/24
You have to have policy from 172.10.10.0/24 to 192.168.1.0/24
And all proper NO-NAT rules and firewall rules

On office router:
You have to have policy from 192.168.1.0/24 to 172.100.100.0/24
You have to have policy from 192.168.1.0/24 to 172.10.10.0/24
And all proper NO-NAT rules and firewall rules

It would be much easier to help you if you post your configs
Thank You tr00g33k for the replay. Here is the routers configurations. I don't have access to the 192.168.1.0/24 router (and the admin don't want to cooperate) that is why I'm trying to connect thru RB1200 :(
RB2011
# jan/30/2017 21:21:35 by RouterOS 6.38.1
# software id = LKZR-EYCF
#
/interface bridge
add admin-mac=E4:8D:8C:27:68:68 auto-mac=no name=bridge-local
/interface ethernet
set [ find default-name=ether1 ] comment="" name=\
    WAN
set [ find default-name=ether2 ] name=ether2-master-local
set [ find default-name=ether3 ] master-port=ether2-master-local name=\
    ether3-slave-local
set [ find default-name=ether4 ] master-port=ether2-master-local name=\
    ether4-slave-local
set [ find default-name=ether5 ] master-port=ether2-master-local name=\
    ether5-slave-local
set [ find default-name=ether6 ] name=ether6-master-local
set [ find default-name=ether7 ] master-port=ether6-master-local name=\
    ether7-slave-local
set [ find default-name=ether8 ] master-port=ether6-master-local name=\
    ether8-slave-local
set [ find default-name=ether9 ] master-port=ether6-master-local name=\
    ether9-slave-local
set [ find default-name=ether10 ] master-port=ether6-master-local name=\
    ether10-slave-local
/ip neighbor discovery
set WAN discover=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
add enc-algorithms=3des name=biaman_kwadra
/ip pool
add name=dhcp ranges=172.100.100.100-172.100.100.149
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge-local name=default
/ppp profile
add idle-timeout=10h local-address=172.10.1.1 name=openvpnprofile \
    remote-address=172.10.1.2 session-timeout=10h
/interface bridge port
add bridge=bridge-local interface=ether2-master-local
add bridge=bridge-local interface=ether6-master-local
add bridge=bridge-local interface=sfp1
/interface ovpn-server server
set certificate=server cipher=blowfish128,aes128,aes192,aes256 \
    default-profile=openvpnprofile enabled=yes require-client-certificate=yes
/ip address
add address=172.100.100.1/24 comment="default configuration" interface=\
    ether2-master-local network=172.100.100.0
add address=ip/29 interface=WAN network=network
add address=ip/29 interface=WAN network=network
/ip dhcp-client
add comment="default configuration" dhcp-options=hostname,clientid interface=\
    WAN
/ip dhcp-server network
add address=172.100.100.0/24 comment="default configuration" gateway=\
    172.100.100.1 ntp-server=172.10.10.210
/ip dns
set allow-remote-requests=yes servers=194.204.152.34,194.204.159.1
/ip dns static
add address=172.100.100.1 name=router
/ip firewall filter
add action=accept chain=input dst-port=1194 log=yes protocol=tcp
add action=accept chain=input dst-port=8291 log=yes log-prefix=\
    winbox_connect! protocol=tcp
add action=accept chain=input comment="default configuration" protocol=icmp
add action=accept chain=input comment="default configuration" \
    connection-state=established,related
add action=drop chain=input comment="default configuration" in-interface=\
    WAN
add action=fasttrack-connection chain=forward comment="default configuration" \
    connection-state=established,related
add action=accept chain=forward comment="default configuration" \
    connection-state=established,related
add action=drop chain=forward comment="default configuration" \
    connection-state=invalid
add action=drop chain=forward comment="default configuration" \
    connection-nat-state=!dstnat connection-state=new in-interface=WAN
/ip firewall nat
add action=accept chain=srcnat dst-address=172.10.10.0/24 out-interface=\
    <ovpn-openvpn> src-address=172.100.100.0/24
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=WAN
/ip route
add distance=1 gateway=IP
add check-gateway=ping distance=1 dst-address=192.168.1.0/24 gateway=172.10.1.2
add disabled=yes distance=1 dst-address=172.10.1.0/24 gateway=<ovpn-openvpn>
add distance=1 dst-address=172.10.10.0/24 gateway=172.10.1.2
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
/ppp secret
add name=openvpn profile=openvpnprofile service=ovpn
/system clock
set time-zone-name=Europe/Warsaw
/system identity
set name=KERRT
/system logging
set 0 disabled=yes
add action=echo topics=ovpn
/system ntp client
set enabled=yes primary-ntp=80.50.231.226 secondary-ntp=217.96.29.26
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local
add interface=ether6-master-local
add interface=ether7-slave-local
add interface=ether8-slave-local
add interface=ether9-slave-local
add interface=ether10-slave-local
add interface=sfp1
add interface=bridge-local
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local
add interface=ether6-master-local
add interface=ether7-slave-local
add interface=ether8-slave-local
add interface=ether9-slave-local
add interface=ether10-slave-local
add interface=sfp1
add interface=bridge-local
RB1200
# jan/30/2017 21:29:01 by RouterOS 5.6
# software id = AWMB-C4MS
#
/interface bridge
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes \
    comment="Sie\E6 LAN, Bridge_LAN" disabled=no forward-delay=15s l2mtu=1598 \
    max-message-age=20s mtu=1500 name=Bridge_LAN priority=0x8000 \
    protocol-mode=none transmit-hold-count=6
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes \
    comment="Interfejs WAN, Bridge_WAN" disabled=no forward-delay=15s l2mtu=\
    1598 max-message-age=20s mtu=1500 name=Bridge_WAN priority=0x8000 \
    protocol-mode=none transmit-hold-count=6
/interface ethernet
set 0 arp=enabled auto-negotiation=yes comment="ETH10-IntelModSrv CMM" \
    disabled=no full-duplex=yes l2mtu=1600 mac-address=00:0C:42:C0:52:4A mtu=\
    1500 name=ETH010-IMSCMM speed=100Mbps
set 1 arp=enabled auto-negotiation=yes disabled=no full-duplex=yes l2mtu=1600 \
    mac-address=00:0C:42:C0:52:4B mtu=1500 name=ether9 speed=100Mbps
set 2 arp=enabled auto-negotiation=yes comment="ETH7-IntelModSrv Ethernet0" \
    disabled=no full-duplex=yes l2mtu=1600 mac-address=00:0C:42:C0:52:4D mtu=\
    1500 name=ETH007-IMSETH0 speed=100Mbps
set 3 arp=enabled auto-negotiation=yes disabled=no full-duplex=yes l2mtu=1600 \
    mac-address=00:0C:42:C0:52:4C mtu=1500 name=ETH008-IMSETH1 speed=100Mbps
set 4 arp=proxy-arp auto-negotiation=yes comment="ETH6 - Router GPRS IWC711" \
    disabled=no full-duplex=yes l2mtu=1600 mac-address=00:0C:42:C0:52:4E mtu=\
    1500 name=ETH006-ROUTERGPRS speed=100Mbps
set 5 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "ETH5 - Interfejs KWSRV2 HP iLO100" disabled=no full-duplex=yes \
    l2mtu=1598 mac-address=00:0C:42:C0:52:4F master-port=none mtu=1500 name=\
    ETH005-KWSRV2iLO100 speed=100Mbps
set 6 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "ETH4 - Interfejs KWSRV1 HP iLO100" disabled=no full-duplex=yes \
    l2mtu=1598 mac-address=00:0C:42:C0:52:50 master-port=none mtu=1500 name=\
    ETH004-KWSRV1iLO100 speed=100Mbps
set 7 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "ETH3 - Interfejs KWSRV2 MAIN" disabled=no full-duplex=yes l2mtu=1598 \
    mac-address=00:0C:42:C0:52:51 master-port=none mtu=1500 name=\
    ETH003-KWSRV2 speed=100Mbps
set 8 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "ETH2 - Interfejs KWSRV1 MAIN" disabled=no full-duplex=yes l2mtu=1598 \
    mac-address=00:0C:42:C0:52:52 master-port=none mtu=1500 name=\
    ETH002-KWSRV1 speed=100Mbps
set 9 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
    "ETH1 - Interfejs WAN ADDR_WAN - Bridge_WAN" disabled=no \
    full-duplex=yes l2mtu=1598 mac-address=00:0C:42:C0:52:53 master-port=none \
    mtu=1500 name=ETH001-WAN speed=100Mbps
/interface ethernet switch
set SwitchV1 mirror-source=none mirror-target=none name=SwitchV1
/ip ipsec proposal
set default auth-algorithms=sha1 disabled=no enc-algorithms=3des lifetime=30m \
    name=default pfs-group=modp1024
add auth-algorithms=sha1 disabled=no enc-algorithms=\
    3des,aes-128,aes-192,aes-256 lifetime=1d name=BTL-proposal pfs-group=\
    modp1024
add auth-algorithms=sha1 disabled=no enc-algorithms=3des lifetime=30m name=\
    office pfs-group=none
/ip pool
add name=pula_LAN ranges=172.10.10.101-172.10.10.200
add name=zewnetrzna ranges=172.10.10.222,172.10.10.223
add name=vpn_KW ranges=172.10.10.180-172.10.10.190
/ip dhcp-server
add address-pool=pula_LAN authoritative=after-2sec-delay bootp-support=static \
    disabled=no interface=Bridge_LAN lease-time=3d name=DHCP_LAN1
/port
set 0 baud-rate=115200 data-bits=8 flow-control=none name=serial0 parity=none \
    stop-bits=1
set 1 baud-rate=115200 data-bits=8 flow-control=none name=serial1 parity=none \
    stop-bits=1
/ppp profile
set default change-tcp-mss=yes name=default only-one=default use-compression=\
    default use-encryption=default use-mpls=default use-vj-compression=\
    default
add bridge=Bridge_LAN change-tcp-mss=default dns-server=8.8.8.8 \
    local-address=vpn_KW name=bomblowy only-one=default remote-address=\
    vpn_KW use-compression=default use-encryption=default use-mpls=\
    default use-vj-compression=default
set default-encryption change-tcp-mss=yes name=default-encryption only-one=\
    default use-compression=default use-encryption=yes use-mpls=default \
    use-vj-compression=default
/interface ovpn-client
add add-default-route=no auth=sha1 certificate=cert2 cipher=aes128 \
    connect-to=IP_RB2011 disabled=no mac-address=02:DD:CE:81:18:FE \
    max-mtu=1500 mode=ip name=ovpn-out1 password=************************ port=1194 \
    profile=default user=openvpn
/queue type
set default kind=pfifo name=default pfifo-limit=50
set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
set wireless-default kind=sfq name=wireless-default sfq-allot=1514 \
    sfq-perturb=5
set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 \
    red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=\
    5
set default-small kind=pfifo name=default-small pfifo-limit=10
/routing bgp instance
set default as=65530 client-to-client-reflection=yes disabled=no \
    ignore-as-path-len=no name=default out-filter="" redistribute-connected=\
    no redistribute-ospf=no redistribute-other-bgp=no redistribute-rip=no \
    redistribute-static=no router-id=0.0.0.0 routing-table=""
/routing ospf instance
set default disabled=no distribute-default=never in-filter=ospf-in \
    metric-bgp=auto metric-connected=20 metric-default=1 metric-other-ospf=\
    auto metric-rip=20 metric-static=20 name=default out-filter=ospf-out \
    redistribute-bgp=no redistribute-connected=no redistribute-other-ospf=no \
    redistribute-rip=no redistribute-static=no router-id=0.0.0.0
/routing ospf area
set backbone area-id=0.0.0.0 disabled=no instance=default name=backbone type=\
    default
/snmp
set contact=admin@KW.pl enabled=yes engine-id="" location=office \
    trap-community=public trap-target=0.0.0.0 trap-version=2
/snmp community
set public address=172.100.100.0/24 authentication-protocol=MD5 \
    encryption-protocol=DES name=public read-access=yes security=none \
    write-access=no
/snmp
set contact=admin@KW.pl enabled=yes engine-id="" location=office \
    trap-community=public trap-target=0.0.0.0 trap-version=2
/system logging action
set memory memory-lines=100 memory-stop-on-full=no name=memory target=memory
set disk disk-file-count=2 disk-file-name=log disk-lines-per-file=100 \
    disk-stop-on-full=no name=disk target=disk
set echo name=echo remember=yes target=echo
set remote bsd-syslog=no name=remote remote-port=514 src-address=0.0.0.0 \
    syslog-facility=daemon syslog-severity=auto target=remote
/system routerboard settings
set baud-rate=115200 boot-delay=9s boot-device=nand-if-fail-then-ethernet \
    boot-protocol=bootp cpu-frequency=1GHz<400DDR> enable-jumper-reset=yes \
    enter-setup-on=any-key force-backup-booter=no silent-boot=no
set baud-rate=115200 boot-delay=9s boot-device=nand-if-fail-then-ethernet \
    boot-protocol=bootp cpu-frequency=1GHz<400DDR> enable-jumper-reset=yes \
    enter-setup-on=any-key force-backup-booter=no silent-boot=no
/user group
add name=read policy="local,telnet,ssh,reboot,read,test,winbox,password,web,sn\
    iff,sensitive,api,!ftp,!write,!policy" skin=default
add name=write policy="local,telnet,ssh,reboot,read,write,test,winbox,password\
    ,web,sniff,sensitive,api,!ftp,!policy" skin=default
add name=full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,winbo\
    x,password,web,sniff,sensitive,api" skin=default
/interface bridge port
add bridge=Bridge_WAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ETH001-WAN path-cost=10 point-to-point=auto priority=0x80
add bridge=Bridge_LAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ETH003-KWSRV2 path-cost=10 point-to-point=auto priority=\
    0x80
add bridge=Bridge_LAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ETH004-KWSRV1iLO100 path-cost=10 point-to-point=auto \
    priority=0x80
add bridge=Bridge_LAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ETH005-KWSRV2iLO100 path-cost=10 point-to-point=auto \
    priority=0x80
add bridge=Bridge_LAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ETH006-ROUTERGPRS path-cost=10 point-to-point=auto priority=\
    0x80
add bridge=Bridge_LAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ETH007-IMSETH0 path-cost=10 point-to-point=auto priority=0x80
add bridge=Bridge_LAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ETH008-IMSETH1 path-cost=10 point-to-point=auto priority=0x80
add bridge=Bridge_LAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ether9 path-cost=10 point-to-point=auto priority=0x80
add bridge=Bridge_LAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ETH010-IMSCMM path-cost=10 point-to-point=auto priority=0x80
add bridge=Bridge_LAN disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ETH002-KWSRV1 path-cost=10 point-to-point=auto priority=\
    0x80
/interface bridge settings
set use-ip-firewall=yes use-ip-firewall-for-pppoe=no \
    use-ip-firewall-for-vlan=yes
/interface ethernet switch port
set ETH005-KWSRV2iLO100 vlan-header=leave-as-is vlan-mode=fallback
set ETH004-KWSRV1iLO100 vlan-header=leave-as-is vlan-mode=fallback
set ETH003-KWSRV2 vlan-header=leave-as-is vlan-mode=fallback
set ETH002-KWSRV1 vlan-header=leave-as-is vlan-mode=fallback
set ETH001-WAN vlan-header=leave-as-is vlan-mode=fallback
set switch1_cpu vlan-header=leave-as-is vlan-mode=fallback
/interface l2tp-server server
set authentication=pap,chap,mschap1,mschap2 default-profile=\
    default-encryption enabled=yes max-mru=1460 max-mtu=1460 mrru=disabled
/interface ovpn-server server
set auth=sha1,md5 certificate=none cipher=blowfish128,aes128 default-profile=\
    default enabled=no keepalive-timeout=60 mac-address=FE:5D:8A:07:74:1A \
    max-mtu=1500 mode=ip netmask=24 port=1194 require-client-certificate=no
/interface pptp-server server
set authentication=pap,chap,mschap1,mschap2 default-profile=bomblowy enabled=\
    yes keepalive-timeout=30 max-mru=1460 max-mtu=1460 mrru=disabled
/interface sstp-server server
set authentication=pap,chap,mschap1,mschap2 certificate=none default-profile=\
    default enabled=no keepalive-timeout=60 max-mru=1500 max-mtu=1500 mrru=\
    disabled port=443 verify-client-certificate=no
/ip accounting
set account-local-traffic=no enabled=no threshold=256
/ip accounting web-access
set accessible-via-web=no address=0.0.0.0/0
/ip address
add address=IP_ADD/32 comment="Interfejs ETH1 - WAN PORT" disabled=no \
    interface=Bridge_WAN network=network
add address=172.10.10.1/24 comment="Interfejs LAN ETH2-ETH10 DHCP" disabled=\
    no interface=Bridge_LAN network=172.10.10.0
add address=IP_ADD/32 comment="Interfejs ETH1 - WAN PORT" disabled=no \
    interface=Bridge_WAN network=network
add address=IP_ADD/32 comment="VPN -> BTL" disabled=no interface=\
    Bridge_WAN network=network

add address=IP_ADD/32 comment="Interfejs ETH1 - WAN PORT" disabled=no \
    interface=Bridge_WAN network=network
/ip dhcp-server config
set store-leases-disk=5m

/ip dhcp-server network
add address=172.10.10.0/24 dns-server=212.33.64.2,212.33.64.18 gateway=\
    172.10.10.1 ntp-server=80.50.231.226,217.96.29.26
/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB \
    max-udp-packet-size=512
/ip dns static
add address=212.33.64.2 disabled=no name="office DNS1" ttl=1d
add address=212.33.64.18 disabled=no name="office DNS2" ttl=1d
/ip firewall connection tracking
set enabled=yes generic-timeout=10m icmp-timeout=10s tcp-close-timeout=10s \
    tcp-close-wait-timeout=10s tcp-established-timeout=1d \
    tcp-fin-wait-timeout=10s tcp-last-ack-timeout=10s \
    tcp-syn-received-timeout=5s tcp-syn-sent-timeout=5s tcp-syncookie=no \
    tcp-time-wait-timeout=10s udp-stream-timeout=3m udp-timeout=10s
/ip firewall filter
add action=accept chain=input disabled=no dst-port=1194 protocol=tcp
add action=accept chain=input disabled=no protocol=ipsec-esp
add action=accept chain=output disabled=no protocol=ipsec-esp
add action=drop chain=input comment="Odrzu\E6 BruteForce na SSH." disabled=no \
    dst-port=22 protocol=tcp src-address-list=ssh_blacklist
add action=drop chain=input comment="Odrzu\E6 BruteForce na Telnet." \
    disabled=no dst-port=23 protocol=tcp src-address-list=telnet_blacklist
add action=add-src-to-address-list address-list=ssh_blacklist \
    address-list-timeout=10h chain=input comment=\
    "[SSH] Dodaneie adresu do listy i ban na 10 dni" connection-state=new \
    disabled=no dst-port=22 protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 \
    address-list-timeout=1m chain=input connection-state=new disabled=no \
    dst-port=22 protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 \
    address-list-timeout=1m chain=input connection-state=new disabled=no \
    dst-port=22 protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 \
    address-list-timeout=1m chain=input connection-state=new disabled=no \
    dst-port=22 protocol=tcp
add action=add-src-to-address-list address-list=telnet_blacklist \
    address-list-timeout=10h chain=input comment=\
    "[Telnet] Dodaneie adresu do listy i ban na 10 dni" connection-state=new \
    disabled=no dst-port=23 protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=telnet_stage3 \
    address-list-timeout=1m chain=input connection-state=new disabled=no \
    dst-port=23 protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=telne_stage2 \
    address-list-timeout=1m chain=input connection-state=new disabled=no \
    dst-port=23 protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=telnet_stage1 \
    address-list-timeout=1m chain=input connection-state=new disabled=no \
    dst-port=23 protocol=tcp
add action=accept chain=input disabled=no dst-port=500 protocol=udp
add action=accept chain=input disabled=no dst-port=1701 protocol=udp
add action=accept chain=input disabled=no dst-port=4500 protocol=udp
add action=accept chain=input disabled=no protocol=ipsec-esp
add action=accept chain=input disabled=no dst-port=61002 protocol=udp
add action=accept chain=input disabled=yes in-interface="(unknown)"
add action=accept chain=input disabled=yes protocol=udp src-port=7110
add action=accept chain=input disabled=no dst-port=1723 protocol=tcp
add action=accept chain=input disabled=no protocol=gre
/ip firewall mangle
add action=mark-routing chain=prerouting content=APN disabled=no \
    new-routing-mark=ToAPN passthrough=no src-address=172.100.100.0/24
/ip firewall nat
add action=accept chain=srcnat disabled=no dst-address=172.100.100.0/24 \
    out-interface=Bridge_WAN src-address=172.10.10.0/24
add action=masquerade chain=srcnat disabled=no dst-address=!192.0.0.0/8
add action=dst-nat chain=dstnat comment=\
    "[HTTPS] Dost\EAp do  KWSRV1" disabled=no dst-address=\
    ip dst-port=443 protocol=tcp to-addresses=172.10.10.50 \
    to-ports=443
add action=dst-nat chain=dstnat comment="[RDP] Dost\EAp zdalny do KWSRV1" \
    disabled=no dst-address=ADDR_WAN dst-port=3389 protocol=tcp \
    to-addresses=172.10.10.30 to-ports=3389
add action=dst-nat chain=dstnat disabled=no dst-address=172.10.10.30 \
    dst-port=7110 protocol=udp src-address=192.168.1.12 to-addresses=\
    172.10.10.30 to-ports=18100
add action=dst-nat chain=dstnat disabled=yes dst-port=7110 protocol=udp \
    to-addresses=172.10.10.30 to-ports=18100
add action=dst-nat chain=dstnat disabled=yes dst-port=18100 protocol=udp \
    to-addresses=172.10.10.30 to-ports=18100
add action=dst-nat chain=dstnat comment=\
    "[HTTP] Dost\EAp do  KWSRV1" disabled=yes dst-address=\
    ADDR_WAN dst-port=80 protocol=tcp to-addresses=172.10.10.11 \
    to-ports=80
add action=dst-nat chain=dstnat comment=\
    "[FTP] Dost\EAp do BACKMGR KWSRV1" disabled=yes dst-port=21 protocol=\
    tcp to-addresses=172.10.10.11 to-ports=21
add action=dst-nat chain=dstnat comment=\
    "[BACKMGR] Dost\EAp do BACKMGR KWSRV1" disabled=yes dst-address=\
    ADDR_WAN dst-port=1701 protocol=tcp to-addresses=172.10.10.11 \
    to-ports=1701
add action=dst-nat chain=dstnat comment=\
    "[HTTP] Dost\EAp do iLO100 KWSRV1" disabled=yes dst-address=\
    ADDR_WAN dst-port=80 protocol=tcp to-addresses=172.10.10.12 \
    to-ports=80
add action=dst-nat chain=dstnat comment=\
    "[HTTPS] Dost\EAp do  KWSRV1" disabled=no dst-address=\
    ADDR_WAN2 dst-port=443 protocol=tcp to-addresses=172.10.10.50 \
    to-ports=443
add action=dst-nat chain=dstnat comment="[RDP] Dost\EAp zdalny do KWSRV1" \
    disabled=no dst-address=ADDR_WAN2 dst-port=3389 protocol=tcp \
    to-addresses=172.10.10.50 to-ports=3389
add action=dst-nat chain=dstnat comment="[RDP] Dost\EAp zdalny do KWTEST" \
    disabled=no dst-address=ADDR_WAN2 dst-port=5685 protocol=tcp \
    to-addresses=172.10.10.111 to-ports=5685
add action=dst-nat chain=dstnat comment="[RDP] Dost\EAp zdalny do KWSRV1" \
    disabled=no dst-address=ADDR_WAN2 dst-port=5598 protocol=tcp \
    to-addresses=172.10.10.106 to-ports=22
add action=dst-nat chain=dstnat comment=\
    "GData Komunikacja z klientem serwerem" disabled=no dst-address=\
    ADDR_WAN3 dst-port=7161 protocol=tcp to-addresses=172.10.10.104 \
    to-ports=7161
add action=dst-nat chain=dstnat comment="HTTPS do Zimbry" disabled=no \
    dst-address=ADDR_WAN3 dst-port=22002 protocol=tcp to-addresses=\
    172.10.10.108 to-ports=22002
add action=dst-nat chain=dstnat comment="HTTPS do Zimbry" disabled=no \
    dst-address=ADDR_WAN3 dst-port=443 protocol=tcp to-addresses=\
    172.10.10.108 to-ports=443
add action=dst-nat chain=dstnat comment="HTTPS do Zimbry" disabled=no \
    dst-address=ADDR_WAN3 dst-port=7071 protocol=tcp to-addresses=\
    172.10.10.108 to-ports=7071
add action=dst-nat chain=dstnat comment="[RDP] Dost\EAp zdalny do KWSRV1" \
    disabled=no dst-address=ADDR_WAN2 dst-port=45678 protocol=tcp \
    to-addresses=172.10.10.109 to-ports=3389
/ip firewall service-port
set ftp disabled=no ports=21
set tftp disabled=no ports=69
set irc disabled=no ports=6667
set h323 disabled=no
set sip disabled=no ports=5060,5061 sip-direct-media=yes
set pptp disabled=no
/ip ipsec peer

add address=IPSec_VPN.address/32 auth-method=pre-shared-key comment=\
    "Po\B3\B9czenie do VPN. Lokalizacja BTL" dh-group=modp1024 \
    disabled=no dpd-interval=disable-dpd dpd-maximum-failures=1 \
    enc-algorithm=3des exchange-mode=main generate-policy=yes hash-algorithm=\
    sha1 lifebytes=4608000 lifetime=1d my-id-user-fqdn="" nat-traversal=no \
    port=500 proposal-check=obey send-initial-contact=yes
/ip ipsec policy
add action=encrypt disabled=yes dst-address=172.100.100.0/24 dst-port=any \
    ipsec-protocols=esp level=require priority=0 proposal=default protocol=\
    all sa-dst-address=10.0.0.1 sa-src-address=10.0.0.2 src-address=\
    172.10.10.0/24 src-port=any tunnel=yes
add action=encrypt comment=QWuuoffice disabled=no dst-address=192.168.1.0/24 \
    dst-port=any ipsec-protocols=esp level=unique priority=0 proposal=\
    BTL-proposal protocol=all sa-dst-address=IPSec_VPN.address sa-src-address=\
    ADDR_WAN src-address=172.10.10.0/24 src-port=any tunnel=yes

/ip neighbor discovery
set ETH010-IMSCMM disabled=no
set ether9 disabled=no
set ETH007-IMSETH0 disabled=no
set ETH008-IMSETH1 disabled=no
set ETH006-ROUTERGPRS disabled=no
set ETH005-KWSRV2iLO100 disabled=no
set ETH004-KWSRV1iLO100 disabled=no
set ETH003-KWSRV2 disabled=no
set ETH002-KWSRV1 disabled=no
set ETH001-WAN disabled=no
set Bridge_LAN disabled=no
set Bridge_WAN disabled=no
set ovpn-out1 disabled=yes
/ip proxy
set always-from-cache=no cache-administrator=webmaster cache-hit-dscp=4 \
    cache-on-disk=no enabled=no max-cache-size=none max-client-connections=\
    600 max-fresh-time=3d max-server-connections=600 parent-proxy=0.0.0.0 \
    parent-proxy-port=0 port=8080 serialize-connections=no src-address=\
    0.0.0.0
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=Bridge_WAN scope=30 \
    target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=192.168.1.0/24 \
    gateway=Bridge_LAN scope=30 target-scope=10
add disabled=yes distance=1 dst-address=172.10.1.0/24 gateway=ovpn-out1 \
    scope=30 target-scope=10
add disabled=no distance=1 dst-address=172.100.100.0/24 gateway=172.10.1.1 \
    scope=30 target-scope=10
/ip route rule
add action=lookup disabled=yes dst-address=172.10.10.11/32 interface=\
    ETH002-KWSRV1 src-address=172.10.10.11/32 table=main
/ip service
set telnet disabled=no port=23
set ftp disabled=yes port=21
set www disabled=no port=7856
set ssh disabled=no port=22
set www-ssl certificate=none disabled=yes port=443
set api disabled=yes port=8728
set winbox disabled=no port=8291
/ip socks
set connection-idle-timeout=2m enabled=no max-connections=200 port=1080

/routing bfd interface
set all disabled=no interface=all interval=0.2sec min-rx=0.2sec multiplier=5
/routing igmp-proxy
set query-interval=2m5s query-response-interval=10s quick-leave=no
/routing mme
set bidirectional-timeout=2 gateway-class=none gateway-keepalive=1m \
    gateway-selection=no-gateway origination-interval=5s preferred-gateway=\
    0.0.0.0 timeout=1m ttl=50
/routing pim
set switch-to-spt=yes switch-to-spt-bytes=0 switch-to-spt-interval=1m40s
/routing rip
set distribute-default=never garbage-timer=2m metric-bgp=1 metric-connected=1 \
    metric-default=1 metric-ospf=1 metric-static=1 redistribute-bgp=no \
    redistribute-connected=no redistribute-ospf=no redistribute-static=no \
    routing-table=main timeout-timer=3m update-timer=30s
/routing rip interface
add authentication=none disabled=no in-prefix-list="" interface=all \
    key-chain="" out-prefix-list="" passive=no receive=v1-2 send=v1-2
/store
add disabled=no disk=system name=user-manager1 type=user-manager
add disabled=no disk=system name=web-proxy1 type=web-proxy
/system clock
set time-zone-name=Europe/Warsaw
/system clock manual
set dst-delta=+00:00 dst-end="jan/01/1970 00:00:00" dst-start=\
    "jan/01/1970 00:00:00" time-zone=+00:00
/system console
add disabled=no port=serial0 term=vt102
add disabled=no port=serial1 term=vt102
/system health
set
/system identity
set name=KWRT
/system logging
add action=memory disabled=no prefix="" topics=info
add action=memory disabled=no prefix="" topics=error
add action=memory disabled=no prefix="" topics=warning
add action=echo disabled=no prefix="" topics=critical
add action=memory disabled=yes prefix=dhcp_ topics=dhcp
add action=memory disabled=no prefix=e_ topics=event
add action=memory disabled=no prefix="" topics=firewall
add action=echo disabled=yes prefix=ipsec_ topics=ipsec
add action=memory disabled=no prefix="" topics=ovpn
/system note
set note="" show-at-login=yes
/system ntp client
set enabled=yes mode=unicast primary-ntp=80.50.231.226 secondary-ntp=\
    217.96.29.26
/system ntp server
set broadcast=no enabled=no manycast=yes multicast=no
/system resource irq
set 0 cpu=auto
set 1 cpu=auto
set 2 cpu=auto
set 3 cpu=auto
set 4 cpu=auto
set 5 cpu=auto
set 6 cpu=auto
set 7 cpu=auto
set 8 cpu=auto
set 9 cpu=auto
set 10 cpu=auto
set 11 cpu=auto
set 12 cpu=auto
set 13 cpu=auto
set 14 cpu=auto
/system upgrade mirror
set check-interval=1d enabled=no primary-server=0.0.0.0 secondary-server=\
    0.0.0.0 user=""
/system watchdog
set auto-send-supout=no automatic-supout=yes no-ping-delay=5m watch-address=\
    none watchdog-timer=yes
/tool bandwidth-server
set allocate-udp-ports-from=2000 authenticate=yes enabled=no max-sessions=100
/tool graphing
set page-refresh=300 store-every=5min
/tool graphing interface
add allow-address=0.0.0.0/0 disabled=no interface=Bridge_WAN store-on-disk=\
    yes
add allow-address=0.0.0.0/0 disabled=no interface=Bridge_LAN store-on-disk=\
    yes
add allow-address=0.0.0.0/0 disabled=no interface=ETH006-ROUTERGPRS \
    store-on-disk=yes
add allow-address=0.0.0.0/0 disabled=no interface=ETH002-KWSRV1 \
    store-on-disk=yes
/tool graphing queue
add allow-address=0.0.0.0/0 allow-target=yes disabled=no simple-queue=all \
    store-on-disk=yes
/tool graphing resource
add allow-address=0.0.0.0/0 disabled=no store-on-disk=yes
/tool mac-server
set (unknown) disabled=no interface=all
/tool mac-server ping
set enabled=yes
/tool sms
set allowed-number="" channel=0 keep-max-sms=0 receive-enabled=no
/tool sniffer
set file-limit=100 file-name="" filter-address1=172.10.10.0/24:0-65535 \
    filter-address2=0.0.0.0/0:0-65535 filter-protocol=ip-only filter-stream=\
    yes interface=all memory-limit=10000 memory-scroll=yes only-headers=no \
    streaming-enabled=no streaming-server=0.0.0.0
/tool traffic-generator
set latency-distribution-scale=10 test-id=0
/tool user-manager customer
add backup-allowed=yes disabled=no login=admin parent=admin \
    paypal-accept-pending=no paypal-allowed=no paypal-secure-response=no \
    permissions=owner signup-allowed=no time-zone=-00:00
/user aaa
set accounting=yes default-group=read interim-update=0s use-radius=no
 
tr00g33k
Frequent Visitor
Frequent Visitor
Posts: 89
Joined: Sun Mar 29, 2015 3:58 pm

Re: Routing between 3 networks

Tue Jan 31, 2017 8:49 pm

From 172.10.10.0/24 you can access 192.168.1.0/24?
If this is true what if you try a trick NAT 172.100.100.0/24 through one of the IPs 172.10.10.0/24 to 192.168.1.0/24, so you will see where to look for the miskate, on your side or other side.
 
bombel
just joined
Topic Author
Posts: 3
Joined: Mon Jan 30, 2017 6:07 pm

Re: Routing between 3 networks

Tue Jan 31, 2017 11:08 pm

From 172.10.10.0/24 you can access 192.168.1.0/24?
If this is true what if you try a trick NAT 172.100.100.0/24 through one of the IPs 172.10.10.0/24 to 192.168.1.0/24, so you will see where to look for the miskate, on your side or other side.
Ok so i found the simple solution :) for my problem. I've changed the addresses of openvpn tunel to the RB1200 network and it works :)
BEFORE
 1   name="openvpnprofile" local-address=172.10.1.253
     remote-address=172.10.1.254 session-timeout=10h idle-timeout=10h 
     use-mpls=default use-compression=default use-encryption=default 
     only-one=default change-tcp-mss=default use-upnp=default address-list="" 
     on-up="" on-down="" 
AFTER
 1   name="openvpnprofile" local-address=172.10.10.253
     remote-address=172.10.10.254 session-timeout=10h idle-timeout=10h 
     use-mpls=default use-compression=default use-encryption=default 
     only-one=default change-tcp-mss=default use-upnp=default address-list="" 
     on-up="" on-down="" 
and added route
add check-gateway=ping distance=1 dst-address=192.168.1.0/24 gateway=\
    <ovpn-openvpn>
so now every packet for 192.168.1.0/24 is sent with 172.10.10.253 address.
Thank you tr00g33k for Your assistance.

You can close the topic :)
 
tr00g33k
Frequent Visitor
Frequent Visitor
Posts: 89
Joined: Sun Mar 29, 2015 3:58 pm

Re: Routing between 3 networks

Wed Feb 01, 2017 3:23 pm

That is the easiest solution if the network 192.168.1.0/24 does not need to access back to 172.100.100.0/24.
This is the worst, if you have to make some VPN tunnels and you dont have access to other side, or un-cooperative network admin on the other side.

Glad that this solved your issue

Who is online

Users browsing this forum: davordaco86, jaclaz, Majestic-12 [Bot], markinhusxp, PLJ020 and 191 guests