Настройка Firewall 450G

Обсуждение ПО и его настройки
Ответить
alex-man-91
Сообщения: 7
Зарегистрирован: 22 апр 2015, 09:24

Добрый день. Есть главный офис и 2 филиала, у всех белые ip-адреса. Везде стоят Mikrotik 450. iPsec поднял, с одним филиалом идет обмен данными, а со вторым не идет. Firewall настроил, но возможно не правильно. Ниже фото с настройками NAT главного офиса. Что настроил не правильно?
Изображение


gmx
Модератор
Сообщения: 3290
Зарегистрирован: 01 окт 2012, 14:48

Ну сами-то как думаете? Может ли врач поставить диагноз взглянув на вашу фотографию???

Инструкции стандартны: временно выключить все правила фаерволла на ВСЕХ микротиках (вы нам кстати не правила фаерволла показали, а правила нат). Добиться, чтобы оба микроика пинговали друг друга, потом прописать маршруты, а потом уж маскарад, если требуется.


alex-man-91
Сообщения: 7
Зарегистрирован: 22 апр 2015, 09:24

Структура сети:
Изображение
У всех белый ip-адрес
 Конфигурация роутера главного офиса
# jan/16/1970 15:33:41 by RouterOS 5.19
# software id = AF2M-TT4N
#

/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha1 disabled=no enc-algorithms=\
aes-256 lifetime=0s name=default pfs-group=modp2048
/ip address
add address=192.168.1.230/24 comment="default configuration" disabled=no \
interface=bridge network=192.168.1.0
/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=drop chain=input comment="Drop Invalid" connection-state=invalid \
disabled=no
add action=accept chain=input comment="Allow IKE" disabled=no dst-port=500 \
protocol=udp
add action=accept chain=input comment="Allow IPSec-esp" disabled=no protocol=\
ipsec-esp
add action=accept chain=input comment="Enable GRE" disabled=no protocol=gre
add action=accept chain=input comment="default configuration" disabled=no \
protocol=icmp
add action=accept chain=input comment="Allow Established" connection-state=\
established disabled=no in-interface=ether1-gateway
add action=accept chain=input comment="default configuration" \
connection-state=related disabled=no in-interface=ether1-gateway
add action=drop chain=input comment="default configuration" disabled=no \
in-interface=ether1-gateway
/ip firewall nat
add action=accept chain=srcnat disabled=no dst-address=192.168.2.0/24 \
src-address=192.168.1.0/24
add action=accept chain=srcnat disabled=no dst-address=192.168.3.0/24 \
src-address=192.168.1.0/24
add action=dst-nat chain=dstnat disabled=no dst-port=3389 in-interface=\
pppoe-out1 protocol=tcp src-port="" to-addresses=192.168.1.200 to-ports=\
3389
add action=masquerade chain=srcnat disabled=no src-address=192.168.1.0/24
add action=accept chain=srcnat disabled=no dst-address=192.168.0.0/24 \
src-address=192.168.1.0/24
/ip firewall service-port
set ftp disabled=yes ports=21
set tftp disabled=yes ports=69
set irc disabled=yes ports=6667
set h323 disabled=yes
set sip disabled=yes ports=5060,5061 sip-direct-media=yes
set pptp disabled=no
/ip hotspot service-port
set ftp disabled=yes ports=21
/ip ipsec peer
add address=212.33.248.119/32 auth-method=pre-shared-key dh-group=modp2048 \
disabled=no dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 \
exchange-mode=aggressive generate-policy=no hash-algorithm=sha1 \
lifebytes=0 lifetime=1d my-id-user-fqdn="" nat-traversal=no port=500 \
proposal-check=obey secret=\
i9Qs2CdN0Viq3PlmctBoz82G8DXbZX16q4wF8r50hDmR6GCDfmPy9PFB58mK \
send-initial-contact=yes
add address=91.144.172.177/32 auth-method=pre-shared-key dh-group=modp2048 \
disabled=no dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 \
exchange-mode=aggressive generate-policy=no hash-algorithm=sha1 \
lifebytes=0 lifetime=1d my-id-user-fqdn="" nat-traversal=no port=500 \
proposal-check=obey secret=HJ0e699sOIh2P172S7ajps6i620663 \
send-initial-contact=yes
/ip ipsec policy
add action=encrypt disabled=no dst-address=192.168.3.0/24 dst-port=any \
ipsec-protocols=esp level=require priority=0 proposal=default protocol=\
all sa-dst-address=212.33.248.119 sa-src-address=92.255.238.204 \
src-address=192.168.1.0/24 src-port=any tunnel=yes
add action=encrypt disabled=no dst-address=192.168.2.0/24 dst-port=any \
ipsec-protocols=esp level=require priority=0 proposal=default protocol=\
all sa-dst-address=91.144.172.177 sa-src-address=92.255.238.204 \
src-address=192.168.1.0/24 src-port=any tunnel=yes
/ip neighbor discovery
set ether1-gateway disabled=yes
set ether2-local disabled=no
set ether3-local disabled=no
set ether4-local disabled=no
set ether5-local disabled=no
set bridge disabled=no
set pppoe-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 service
set telnet address="" disabled=yes port=23
set ftp address="" disabled=yes port=21
set www address=192.168.0.0/24 disabled=yes port=80
set ssh address="" disabled=yes port=22
set www-ssl address=192.168.0.2/32 certificate=none disabled=yes port=443
set api address="" disabled=yes port=8728
set winbox address=192.168.1.0/24,192.168.3.0/24 disabled=no port=8291
/ip smb
set allow-guests=yes comment=MikrotikSMB domain=MSHOME enabled=no interfaces=\
all
/ip smb shares
set [ find default=yes ] comment="default share" directory=/pub disabled=no \
max-sessions=10 name=pub
/ip smb users
set [ find default=yes ] disabled=no name=guest password="" read-only=yes
/ip socks
set connection-idle-timeout=2m enabled=no max-connections=200 port=1080
/ip traffic-flow
set active-flow-timeout=30m cache-entries=4k enabled=no \
inactive-flow-timeout=15s interfaces=all
/ip upnp
set allow-disable-external-interface=no enabled=no show-dummy-rule=no

 Конфигурация второго роутера
# apr/16/2015 10:08:18 by RouterOS 6.19
# software id = H7IX-FK8M
#
/interface bridge
add l2mtu=1520 name=bridge protocol-mode=none
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-256-cbc lifetime=0s pfs-group=\
modp2048
/ip address
add address=192.168.2.1/24 interface=bridge network=192.168.2.0
/ip firewall filter
add action=drop chain=input comment="Drop Invalid" connection-state=invalid
add chain=input comment="Allow IKE" dst-port=500 protocol=udp
add chain=input comment="Allow IPSec-esp" protocol=ipsec-esp
add chain=input comment="Enable GRE" protocol=gre
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="Allow Established" connection-state=established \
in-interface=ether1-gateway
add chain=input comment="default configuration" connection-state=related \
in-interface=ether1-gateway
add chain=input comment="default configuration" in-interface=ether1-gateway
/ip firewall nat
add chain=srcnat dst-address=192.168.1.0/24 src-address=192.168.2.0/24
add action=masquerade chain=srcnat src-address=192.168.2.0/24
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
/ip ipsec peer
# Unsafe configuration, suggestion to use certificates
add address=92.255.238.204/32 dh-group=modp2048 enc-algorithm=aes-256 \
exchange-mode=aggressive secret=HJ0e699sOIh2P172S7ajps6i620663
/ip ipsec policy
add dst-address=192.168.1.0/24 sa-dst-address=92.255.238.204 sa-src-address=\
91.144.172.177 src-address=192.168.2.0/24 tunnel=yes
/ip proxy
set max-cache-size=none parent-proxy=0.0.0.0
/ip upnp
set allow-disable-external-interface=no

 Конфигурация третьего роутера
# feb/13/1970 21:45:07 by RouterOS 5.19
# software id = 5BTV-NQ5I
#
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha1 disabled=no enc-algorithms=\
aes-256 lifetime=0s name=default pfs-group=modp2048
/ip address
add address=192.168.3.1/24 disabled=no interface=bridge network=192.168.3.0
/ip firewall filter
add action=drop chain=input comment="Drop Invalid" connection-state=invalid \
disabled=no
add action=accept chain=input comment="Allow IKE" disabled=no dst-port=500 \
protocol=udp
add action=accept chain=input comment="Allow IPSec-esp" disabled=no protocol=\
ipsec-esp
add action=accept chain=input comment="Enable GRE" disabled=no protocol=gre
add action=accept chain=input comment="default configuration" disabled=no \
protocol=icmp
add action=accept chain=input comment="Allow Established" connection-state=\
established disabled=no in-interface=ether1-gateway
add action=accept chain=input comment="default configuration" \
connection-state=related disabled=no in-interface=ether1-gateway
add action=accept chain=input comment="default configuration" disabled=no \
in-interface=ether1-gateway
add action=drop chain=forward disabled=yes dst-port=80 protocol=tcp \
src-address=192.168.3.2
/ip firewall nat
add action=accept chain=srcnat disabled=no dst-address=192.168.1.0/24 \
src-address=192.168.3.0/24
add action=masquerade chain=srcnat disabled=no src-address=192.168.3.0/24
/ip ipsec peer
add address=92.255.238.204/32 auth-method=pre-shared-key dh-group=modp2048 \
disabled=no dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 \
exchange-mode=aggressive generate-policy=no hash-algorithm=sha1 \
lifebytes=0 lifetime=1d my-id-user-fqdn="" nat-traversal=yes port=500 \
proposal-check=obey secret=\
i9Qs2CdN0Viq3PlmctBoz82G8DXbZX16q4wF8r50hDmR6GCDfmPy9PFB58mK \
send-initial-contact=yes
/ip ipsec policy
add action=encrypt disabled=no dst-address=192.168.1.0/24 dst-port=any \
ipsec-protocols=esp level=require priority=0 proposal=default protocol=\
all sa-dst-address=92.255.238.204 sa-src-address=212.33.248.119 \
src-address=192.168.3.0/24 src-port=any tunnel=yes


Между первым и третьим есть связь. А между первым и вторым ipSec подняли, но пакетами не обмениваются.


gmx
Модератор
Сообщения: 3290
Зарегистрирован: 01 окт 2012, 14:48

где в конфигах раздел ip route?

Зачем такой сложный scr-nat???

Все просто:
на каждом микротике добавляете правила route для каждой подсети, в качестве шлюза соответствующий микротик, и маскарадинг делаете обобщенным, так сказать, указывая только src-nat и action=masquerade,
без всяких дополнительных src-nat.
Второй и третий микроики должны иметь IP из диапазона первого, полученный в рамках VPN подключения.


alex-man-91
Сообщения: 7
Зарегистрирован: 22 апр 2015, 09:24

Перенастроил, но второй Mikrotik все равно не хочет связываться с главным офисом. Третий обменивается данными. но сервер главного офиса не видит принтер 3 офиса.
 Конфигурация главного офиса
# jan/21/1970 15:55:45 by RouterOS 5.19
# software id = AF2M-TT4N
#
/interface bridge
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes \
disabled=no forward-delay=15s l2mtu=1520 max-message-age=20s mtu=1500 \
name=bridge priority=0x8000 protocol-mode=none transmit-hold-count=6
/interface ethernet
set 0 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DA \
master-port=none mtu=1500 name=ether1-gateway speed=100Mbps
set 1 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DB \
master-port=none mtu=1500 name=ether2-local speed=100Mbps
set 2 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DC \
master-port=none mtu=1500 name=ether3-local speed=100Mbps
set 3 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DD \
master-port=none mtu=1500 name=ether4-local speed=100Mbps
set 4 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DE \
master-port=none mtu=1500 name=ether5-local speed=100Mbps
/interface ethernet switch
set 0 mirror-source=none mirror-target=none name=switch1 switch-all-ports=yes
/ip hotspot profile
set [ find default=yes ] dns-name="" hotspot-address=0.0.0.0 html-directory=\
hotspot http-cookie-lifetime=3d http-proxy=0.0.0.0:0 login-by=\
cookie,http-chap name=default rate-limit="" smtp-server=0.0.0.0 \
split-user-domain=no use-radius=no
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m name=default \
shared-users=1 status-autorefresh=1m transparent-proxy=no
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha1 disabled=no enc-algorithms=\
aes-256 lifetime=0s name=default pfs-group=modp2048
/ip pool
add name=dhcp_pool1 ranges=192.168.1.150-192.168.1.170
/ip dhcp-server
add add-arp=yes address-pool=dhcp_pool1 authoritative=after-2sec-delay \
bootp-support=static disabled=no interface=bridge lease-time=1w name=\
dhcp1
/port
set 0 baud-rate=auto data-bits=8 flow-control=none name=serial0 parity=none \
stop-bits=1
/ppp profile
set 0 change-tcp-mss=yes name=default only-one=yes remote-ipv6-prefix-pool=\
none use-compression=default use-encryption=default use-ipv6=yes \
use-mpls=default use-vj-compression=default
set 1 change-tcp-mss=yes name=default-encryption only-one=yes \
remote-ipv6-prefix-pool=none use-compression=default use-encryption=yes \
use-ipv6=yes use-mpls=default use-vj-compression=default
/queue type
set 0 kind=pfifo name=default pfifo-limit=50
set 1 kind=pfifo name=ethernet-default pfifo-limit=50
set 2 kind=sfq name=wireless-default sfq-allot=1514 sfq-perturb=5
set 3 kind=red name=synchronous-default red-avg-packet=1000 red-burst=20 \
red-limit=60 red-max-threshold=50 red-min-threshold=10
set 4 kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=5
set 5 kind=none name=only-hardware-queue
set 6 kind=mq-pfifo mq-pfifo-limit=50 name=multi-queue-ethernet-default
set 7 kind=pfifo name=default-small pfifo-limit=10
/queue simple
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/1M name=Buh1 \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.30/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/1M name=Secret \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.4/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/1M name=Buh2 \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.31/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/1M name=Buh6 \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.35/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/1M name=Snab \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.67/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/1M name=Usr2 \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.62/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/1M name=Usr1 \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.63/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/1M name=Snab2 \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.68/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/3M name=Manager3 \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.6/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/3M name=Manager4 \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.61/32 total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s direction=both \
disabled=no interface=all limit-at=0/0 max-limit=0/512k name=Buh3 \
packet-marks="" parent=none priority=8 queue=default-small/default-small \
target-addresses=192.168.0.32/32 total-queue=default-small
/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 [ find default=yes ] 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 [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=\
backbone type=default
/routing ospf-v3 instance
set [ find default=yes ] disabled=no distribute-default=never metric-bgp=auto \
metric-connected=20 metric-default=1 metric-other-ospf=auto metric-rip=20 \
metric-static=20 name=default redistribute-bgp=no redistribute-connected=\
no redistribute-other-ospf=no redistribute-rip=no redistribute-static=no \
router-id=0.0.0.0
/routing ospf-v3 area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=\
backbone type=default
/snmp community
set [ find default=yes ] addresses=0.0.0.0/0 authentication-password="" \
authentication-protocol=MD5 encryption-password="" encryption-protocol=\
DES name=public read-access=yes security=none write-access=no
/system logging action
set 0 memory-lines=100 memory-stop-on-full=no name=memory target=memory
set 1 disk-file-count=2 disk-file-name=log disk-lines-per-file=100 \
disk-stop-on-full=no name=disk target=disk
set 2 name=echo remember=yes target=echo
set 3 bsd-syslog=no name=remote remote=0.0.0.0 remote-port=514 src-address=\
0.0.0.0 syslog-facility=daemon syslog-severity=auto target=remote
/user group
set read name=read policy="local,telnet,ssh,reboot,read,test,winbox,password,w\
eb,sniff,sensitive,api,!ftp,!write,!policy" skin=default
set write name=write policy="local,telnet,ssh,reboot,read,write,test,winbox,pa\
ssword,web,sniff,sensitive,api,!ftp,!policy" skin=default
set full name=full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,\
winbox,password,web,sniff,sensitive,api" skin=default
/interface bridge port
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether2-local path-cost=10 point-to-point=auto priority=0x80
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether3-local path-cost=10 point-to-point=auto priority=0x80
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether4-local path-cost=10 point-to-point=auto priority=0x80
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether5-local path-cost=10 point-to-point=auto priority=0x80
add disabled=no edge=auto external-fdb=auto horizon=none interface=\
ether1-gateway path-cost=10 point-to-point=auto priority=0x80
/interface bridge settings
set use-ip-firewall=no use-ip-firewall-for-pppoe=no use-ip-firewall-for-vlan=\
no
/interface ethernet switch port
set 0 vlan-header=leave-as-is vlan-mode=fallback
set 1 vlan-header=leave-as-is vlan-mode=fallback
set 2 vlan-header=leave-as-is vlan-mode=fallback
set 3 vlan-header=leave-as-is vlan-mode=fallback
set 4 vlan-header=leave-as-is vlan-mode=fallback
set 5 vlan-header=leave-as-is vlan-mode=fallback
/interface l2tp-server server
set authentication=mschap2 default-profile=default-encryption enabled=no \
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:E3:2C:6B:F1:3C \
max-mtu=1500 mode=ip netmask=24 port=1194 require-client-certificate=no
/interface pptp-server server
set authentication=mschap2 default-profile=default-encryption 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=192.168.1.230/24 comment="default configuration" disabled=no \
interface=bridge network=192.168.1.0
/ip dhcp-server config
set store-leases-disk=5m
/ip dhcp-server network
add address=192.168.1.0/24 dhcp-option="" dns-server=\
91.144.150.1,91.144.148.1 gateway=192.168.1.230 ntp-server="" \
wins-server=""
/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=drop chain=input comment="Drop Invalid" connection-state=invalid \
disabled=no
add action=accept chain=input comment="Allow IKE" disabled=no dst-port=500 \
protocol=udp
add action=accept chain=input comment="Allow IPSec-esp" disabled=no protocol=\
ipsec-esp
add action=accept chain=input comment="Enable GRE" disabled=no protocol=gre
add action=accept chain=input comment="default configuration" disabled=no \
protocol=icmp
add action=accept chain=input comment="Allow Established" connection-state=\
established disabled=no in-interface=ether1-gateway
add action=accept chain=input comment="default configuration" \
connection-state=related disabled=no in-interface=ether1-gateway
add action=drop chain=input comment="default configuration" disabled=no \
in-interface=ether1-gateway
/ip firewall nat
add action=accept chain=srcnat disabled=yes dst-address=192.168.3.0/24 \
src-address=192.168.1.0/24
add action=dst-nat chain=dstnat disabled=no dst-port=3389 in-interface=\
pppoe-out1 protocol=tcp src-port="" to-addresses=192.168.1.200 to-ports=\
3389
add action=masquerade chain=srcnat disabled=no src-address=192.168.1.0/24
/ip firewall service-port
set ftp disabled=yes ports=21
set tftp disabled=yes ports=69
set irc disabled=yes ports=6667
set h323 disabled=yes
set sip disabled=yes ports=5060,5061 sip-direct-media=yes
set pptp disabled=no
/ip hotspot service-port
set ftp disabled=yes ports=21
/ip ipsec peer
add address=212.33.248.119/32 auth-method=pre-shared-key dh-group=modp2048 \
disabled=no dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 \
exchange-mode=aggressive generate-policy=no hash-algorithm=sha1 \
lifebytes=0 lifetime=1d my-id-user-fqdn="" nat-traversal=no port=500 \
proposal-check=obey secret=\
i9Qs2CdN0Viq3PlmctBoz82G8DXbZX16q4wF8r50hDmR6GCDfmPy9PFB58mK \
send-initial-contact=yes
add address=91.144.172.177/32 auth-method=pre-shared-key dh-group=modp2048 \
disabled=no dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 \
exchange-mode=aggressive generate-policy=no hash-algorithm=sha1 \
lifebytes=0 lifetime=1d my-id-user-fqdn="" nat-traversal=no port=500 \
proposal-check=obey secret=HJ0e699sOIh2P172S7ajps6i620663 \
send-initial-contact=yes
/ip ipsec policy
add action=encrypt disabled=no dst-address=192.168.3.0/24 dst-port=any \
ipsec-protocols=esp level=require priority=0 proposal=default protocol=\
all sa-dst-address=212.33.248.119 sa-src-address=92.255.238.204 \
src-address=192.168.1.0/24 src-port=any tunnel=yes
add action=encrypt disabled=no dst-address=192.168.2.0/24 dst-port=any \
ipsec-protocols=esp level=require priority=0 proposal=default protocol=\
all sa-dst-address=91.144.172.177 sa-src-address=92.255.238.204 \
src-address=192.168.1.0/24 src-port=any tunnel=yes
/ip neighbor discovery
set ether1-gateway disabled=yes
set ether2-local disabled=no
set ether3-local disabled=no
set ether4-local disabled=no
set ether5-local disabled=no
set bridge disabled=no
set pppoe-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 rule
add action=lookup disabled=no dst-address=192.168.2.0/24 src-address=\
192.168.1.0/24 table=main
add action=lookup disabled=no dst-address=192.168.3.0/24 src-address=\
192.168.1.0/24 table=main
/ip service
set telnet address="" disabled=yes port=23
set ftp address="" disabled=yes port=21
set www address=192.168.0.0/24 disabled=yes port=80
set ssh address="" disabled=yes port=22
set www-ssl address=192.168.0.2/32 certificate=none disabled=yes port=443
set api address="" disabled=yes port=8728
set winbox address=192.168.1.0/24,192.168.3.0/24 disabled=no port=8291
/ip smb
set allow-guests=yes comment=MikrotikSMB domain=MSHOME enabled=no interfaces=\
all
/ip smb shares
set [ find default=yes ] comment="default share" directory=/pub disabled=no \
max-sessions=10 name=pub
/ip smb users
set [ find default=yes ] disabled=no name=guest password="" read-only=yes
/ip socks
set connection-idle-timeout=2m enabled=no max-connections=200 port=1080
/ip traffic-flow
set active-flow-timeout=30m cache-entries=4k enabled=no \
inactive-flow-timeout=15s interfaces=all
/ip upnp
set allow-disable-external-interface=no enabled=no show-dummy-rule=no
/ipv6 nd
set [ find default=yes ] advertise-dns=no advertise-mac-address=yes disabled=\
no hop-limit=unspecified interface=all managed-address-configuration=no \
mtu=unspecified other-configuration=no ra-delay=3s ra-interval=3m20s-10m \
ra-lifetime=30m reachable-time=unspecified retransmit-interval=\
unspecified
/ipv6 nd prefix default
set autonomous=yes preferred-lifetime=1w valid-lifetime=4w2d
/mpls
set dynamic-label-range=16-1048575 propagate-ttl=yes
/mpls interface
set [ find default=yes ] disabled=no interface=all mpls-mtu=1508
/mpls ldp
set distribute-for-default-route=no enabled=no hop-limit=255 loop-detect=no \
lsr-id=0.0.0.0 path-vector-limit=255 transport-address=0.0.0.0 \
use-explicit-null=no
/port firmware
set directory=firmware ignore-directip-modem=no
/ppp aaa
set accounting=yes interim-update=0s use-radius=no
/queue interface
set ether1-gateway queue=ethernet-default
set ether2-local queue=ethernet-default
set ether3-local queue=ethernet-default
set ether4-local queue=ethernet-default
set ether5-local queue=ethernet-default
/radius incoming
set accept=no port=3799
/routing bfd interface
set [ find default=yes ] disabled=no interface=all interval=0.2s min-rx=0.2s \
multiplier=5
/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 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 ripng
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 \
timeout-timer=3m update-timer=30s
/snmp
set contact="" enabled=no engine-id="" location="" trap-generators="" \
trap-target="" trap-version=1
/system clock
set time-zone-name=Europe/Moscow
/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
set [ find port=serial0 ] channel=0 disabled=no port=serial0 term=vt102
/system identity
set name=MikroTik
/system logging
set 0 action=memory disabled=no prefix="" topics=info
set 1 action=memory disabled=no prefix="" topics=error
set 2 action=memory disabled=no prefix="" topics=warning
set 3 action=echo disabled=no prefix="" topics=critical
/system note
set note="" show-at-login=yes
/system ntp client
set enabled=yes mode=unicast primary-ntp=192.43.244.18 secondary-ntp=\
65.55.21.23
/system resource irq
set 0 cpu=auto
set 1 cpu=auto
set 2 cpu=auto
set 3 cpu=auto
/system routerboard settings
set baud-rate=115200 boot-delay=2s boot-device=nand-if-fail-then-ethernet \
boot-protocol=bootp cpu-frequency=600MHz enable-jumper-reset=yes \
enter-setup-on=any-key force-backup-booter=no silent-boot=yes
/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 e-mail
set address=0.0.0.0 from=<> password="" port=25 starttls=no user=""
/tool graphing
set page-refresh=300 store-every=5min
/tool mac-server
add disabled=no interface=ether2-local
add disabled=no interface=ether3-local
add disabled=no interface=ether4-local
add disabled=no interface=ether5-local
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes interface=all
add disabled=no interface=ether2-local
add disabled=no interface=ether3-local
add disabled=no interface=ether4-local
add disabled=no interface=ether5-local
add disabled=no interface=bridge
/tool mac-server ping
set enabled=yes
/tool sms
set allowed-number="" channel=0 keep-max-sms=0 receive-enabled=no secret=""
/tool sniffer
set file-limit=1000KiB file-name="" filter-ip-address="" filter-ip-protocol=\
"" filter-mac-address="" filter-mac-protocol="" filter-port="" \
filter-stream=yes interface=all memory-limit=100KiB 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
/user aaa
set accounting=yes default-group=read exclude-groups="" interim-update=0s \
use-radius=no

 Конфигурация второго микротика
# apr/17/2015 09:28:12 by RouterOS 6.19
# software id = H7IX-FK8M
#
/interface bridge
add l2mtu=1520 name=bridge protocol-mode=none
/interface ethernet
set [ find default-name=ether1 ] name=ether1-gateway
set [ find default-name=ether2 ] mac-address=00:0C:42:A3:C5:73 name=\
ether2-local
set [ find default-name=ether3 ] mac-address=00:0C:42:A3:C5:74 name=\
ether3-local
set [ find default-name=ether4 ] mac-address=00:0C:42:A3:C5:75 name=\
ether4-local
set [ find default-name=ether5 ] mac-address=00:0C:42:A3:C5:76 name=\
ether5-local
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-256-cbc lifetime=0s pfs-group=\
modp2048
/port
set 0 name=serial0
/ppp profile
set 0 only-one=yes
set 1 only-one=yes
/ip neighbor discovery
set pppoe-out1 discover=no
/system logging action
set 0 memory-lines=100
set 1 disk-lines-per-file=100
/interface bridge port
add bridge=bridge interface=ether2-local
add bridge=bridge interface=ether3-local
add bridge=bridge interface=ether4-local
add bridge=bridge interface=ether5-local
add interface=ether1-gateway
/interface l2tp-server server
set authentication=mschap2 max-mru=1460 max-mtu=1460
/interface pptp-server server
set authentication=mschap2 enabled=yes max-mru=1460 max-mtu=1460
/ip address
add address=192.168.2.1/24 interface=bridge network=192.168.2.0
/ip firewall filter
add action=drop chain=input comment="Drop Invalid" connection-state=invalid
add chain=input comment="Allow IKE" dst-port=500 protocol=udp
add chain=input comment="Allow IPSec-esp" protocol=ipsec-esp
add chain=input comment="Enable GRE" protocol=gre
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="Allow Established" connection-state=established \
in-interface=ether1-gateway
add chain=input comment="default configuration" connection-state=related \
in-interface=ether1-gateway
add chain=input comment="default configuration" in-interface=ether1-gateway
/ip firewall nat
add action=masquerade chain=srcnat src-address=192.168.2.0/24
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
/ip ipsec peer
# Unsafe configuration, suggestion to use certificates
add address=92.255.238.204/32 dh-group=modp2048 enc-algorithm=aes-256 \
exchange-mode=aggressive secret=HJ0e699sOIh2P172S7ajps6i620663
/ip ipsec policy
add dst-address=192.168.1.0/24 sa-dst-address=92.255.238.204 sa-src-address=\
91.144.172.177 src-address=192.168.2.0/24 tunnel=yes
/ip proxy
set max-cache-size=none parent-proxy=0.0.0.0
/ip route rule
add dst-address=192.168.1.0/24 src-address=192.168.2.0/24 table=main
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
set api disabled=yes
set winbox address=192.168.1.0/24,192.168.2.0/24
/ip upnp
set allow-disable-external-interface=no
/system clock
set time-zone-name=Europe/Moscow
/system ntp client
set enabled=yes primary-ntp=192.43.244.18 secondary-ntp=65.55.21.23
/tool bandwidth-server
set enabled=no
/tool mac-server
add

 Конфигурация третьего микротика
# feb/18/1970 22:01:32 by RouterOS 5.19
# software id = 5BTV-NQ5I
#
/interface bridge
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes \
disabled=no forward-delay=15s l2mtu=1520 max-message-age=20s mtu=1500 \
name=bridge priority=0x8000 protocol-mode=none transmit-hold-count=6
/interface ethernet
set 0 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:A3:C5:72 \
master-port=none mtu=1500 name=ether1-gateway speed=100Mbps
set 1 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:A3:C5:73 \
master-port=none mtu=1500 name=ether2-local speed=100Mbps
set 2 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:A3:C5:74 \
master-port=none mtu=1500 name=ether3-local speed=100Mbps
set 3 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:A3:C5:75 \
master-port=none mtu=1500 name=ether4-local speed=100Mbps
set 4 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:A3:C5:76 \
master-port=none mtu=1500 name=ether5-local speed=100Mbps
/interface ethernet switch
set 0 mirror-source=none mirror-target=none name=switch1 switch-all-ports=yes
/ip hotspot profile
set [ find default=yes ] dns-name="" hotspot-address=0.0.0.0 html-directory=\
hotspot http-cookie-lifetime=3d http-proxy=0.0.0.0:0 login-by=\
cookie,http-chap name=default rate-limit="" smtp-server=0.0.0.0 \
split-user-domain=no use-radius=no
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m name=default \
shared-users=1 status-autorefresh=1m transparent-proxy=no
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha1 disabled=no enc-algorithms=\
aes-256 lifetime=0s name=default pfs-group=modp2048
/port
set 0 baud-rate=auto data-bits=8 flow-control=none name=serial0 parity=none \
stop-bits=1
/ppp profile
set 0 change-tcp-mss=yes name=default only-one=yes remote-ipv6-prefix-pool=\
none use-compression=default use-encryption=default use-ipv6=yes \
use-mpls=default use-vj-compression=default
set 1 change-tcp-mss=yes name=default-encryption only-one=yes \
remote-ipv6-prefix-pool=none use-compression=default use-encryption=yes \
use-ipv6=yes use-mpls=default use-vj-compression=default
/queue type
set 0 kind=pfifo name=default pfifo-limit=50
set 1 kind=pfifo name=ethernet-default pfifo-limit=50
set 2 kind=sfq name=wireless-default sfq-allot=1514 sfq-perturb=5
set 3 kind=red name=synchronous-default red-avg-packet=1000 red-burst=20 \
red-limit=60 red-max-threshold=50 red-min-threshold=10
set 4 kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=5
set 5 kind=none name=only-hardware-queue
set 6 kind=mq-pfifo mq-pfifo-limit=50 name=multi-queue-ethernet-default
set 7 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 [ find default=yes ] 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 [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=\
backbone type=default
/routing ospf-v3 instance
set [ find default=yes ] disabled=no distribute-default=never metric-bgp=auto \
metric-connected=20 metric-default=1 metric-other-ospf=auto metric-rip=20 \
metric-static=20 name=default redistribute-bgp=no redistribute-connected=\
no redistribute-other-ospf=no redistribute-rip=no redistribute-static=no \
router-id=0.0.0.0
/routing ospf-v3 area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=\
backbone type=default
/snmp community
set [ find default=yes ] addresses=0.0.0.0/0 authentication-password="" \
authentication-protocol=MD5 encryption-password="" encryption-protocol=\
DES name=public read-access=yes security=none write-access=no
/system logging action
set 0 memory-lines=100 memory-stop-on-full=no name=memory target=memory
set 1 disk-file-count=2 disk-file-name=log disk-lines-per-file=100 \
disk-stop-on-full=no name=disk target=disk
set 2 name=echo remember=yes target=echo
set 3 bsd-syslog=no name=remote remote=:: remote-port=514 src-address=0.0.0.0 \
syslog-facility=daemon syslog-severity=auto target=remote
/user group
set read name=read policy="local,telnet,ssh,reboot,read,test,winbox,password,w\
eb,sniff,sensitive,api,!ftp,!write,!policy" skin=default
set write name=write policy="local,telnet,ssh,reboot,read,write,test,winbox,pa\
ssword,web,sniff,sensitive,api,!ftp,!policy" skin=default
set full name=full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,\
winbox,password,web,sniff,sensitive,api" skin=default
/interface bridge port
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether2-local path-cost=10 point-to-point=auto priority=0x80
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether3-local path-cost=10 point-to-point=auto priority=0x80
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether4-local path-cost=10 point-to-point=auto priority=0x80
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether5-local path-cost=10 point-to-point=auto priority=0x80
add disabled=no edge=auto external-fdb=auto horizon=none interface=\
ether1-gateway path-cost=10 point-to-point=auto priority=0x80
/interface bridge settings
set use-ip-firewall=no use-ip-firewall-for-pppoe=no use-ip-firewall-for-vlan=\
no
/interface ethernet switch port
set 0 vlan-header=leave-as-is vlan-mode=fallback
set 1 vlan-header=leave-as-is vlan-mode=fallback
set 2 vlan-header=leave-as-is vlan-mode=fallback
set 3 vlan-header=leave-as-is vlan-mode=fallback
set 4 vlan-header=leave-as-is vlan-mode=fallback
set 5 vlan-header=leave-as-is vlan-mode=fallback
/interface l2tp-server server
set authentication=mschap2 default-profile=default-encryption enabled=no \
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:72:A5:57:72:9D \
max-mtu=1500 mode=ip netmask=24 port=1194 require-client-certificate=no
/interface pptp-server server
set authentication=mschap2 default-profile=default-encryption 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=192.168.3.1/24 disabled=no interface=bridge network=192.168.3.0
/ip dhcp-server config
set store-leases-disk=5m
/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=drop chain=input comment="Drop Invalid" connection-state=invalid \
disabled=no
add action=accept chain=input comment="Allow IKE" disabled=no dst-port=500 \
protocol=udp
add action=accept chain=input comment="Allow IPSec-esp" disabled=no protocol=\
ipsec-esp
add action=accept chain=input comment="Enable GRE" disabled=no protocol=gre
add action=accept chain=input comment="default configuration" disabled=no \
protocol=icmp
add action=accept chain=input comment="Allow Established" connection-state=\
established disabled=no in-interface=ether1-gateway
add action=accept chain=input comment="default configuration" \
connection-state=related disabled=no in-interface=ether1-gateway
add action=accept chain=input comment="default configuration" disabled=no \
in-interface=ether1-gateway
add action=drop chain=forward disabled=yes dst-port=80 protocol=tcp \
src-address=192.168.3.2
/ip firewall nat
add action=accept chain=srcnat disabled=yes dst-address=192.168.1.0/24 \
src-address=192.168.3.0/24
add action=masquerade chain=srcnat disabled=no src-address=192.168.3.0/24
/ip firewall service-port
set ftp disabled=yes ports=21
set tftp disabled=yes ports=69
set irc disabled=yes ports=6667
set h323 disabled=yes
set sip disabled=yes ports=5060,5061 sip-direct-media=yes
set pptp disabled=no
/ip hotspot service-port
set ftp disabled=no ports=21
/ip ipsec peer
add address=92.255.238.204/32 auth-method=pre-shared-key dh-group=modp2048 \
disabled=no dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 \
exchange-mode=aggressive generate-policy=no hash-algorithm=sha1 \
lifebytes=0 lifetime=1d my-id-user-fqdn="" nat-traversal=yes port=500 \
proposal-check=obey secret=\
i9Qs2CdN0Viq3PlmctBoz82G8DXbZX16q4wF8r50hDmR6GCDfmPy9PFB58mK \
send-initial-contact=yes
/ip ipsec policy
add action=encrypt disabled=no dst-address=192.168.1.0/24 dst-port=any \
ipsec-protocols=esp level=require priority=0 proposal=default protocol=\
all sa-dst-address=92.255.238.204 sa-src-address=212.33.248.119 \
src-address=192.168.3.0/24 src-port=any tunnel=yes
/ip neighbor discovery
set ether1-gateway disabled=no
set ether2-local disabled=no
set ether3-local disabled=no
set ether4-local disabled=no
set ether5-local disabled=no
set bridge disabled=no
set pppoe-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 rule
add action=lookup disabled=no dst-address=192.168.1.0/24 src-address=\
192.168.3.0/24 table=main
/ip service
set telnet address="" disabled=yes port=23
set ftp address="" disabled=yes port=21
set www address="" disabled=yes port=80
set ssh address="" disabled=yes port=22
set www-ssl address="" certificate=none disabled=yes port=443
set api address="" disabled=yes port=8728
set winbox address=192.168.1.0/24,192.168.3.0/24 disabled=no port=8291
/ip smb
set allow-guests=yes comment=MikrotikSMB domain=MSHOME enabled=no interfaces=\
all
/ip smb shares
set [ find default=yes ] comment="default share" directory=/pub disabled=no \
max-sessions=10 name=pub
/ip smb users
set [ find default=yes ] disabled=no name=guest password="" read-only=yes
/ip socks
set connection-idle-timeout=2m enabled=no max-connections=200 port=1080
/ip traffic-flow
set active-flow-timeout=30m cache-entries=4k enabled=no \
inactive-flow-timeout=15s interfaces=all
/ip upnp
set allow-disable-external-interface=yes enabled=no show-dummy-rule=yes
/ipv6 nd
set [ find default=yes ] advertise-dns=no advertise-mac-address=yes disabled=\
no hop-limit=unspecified interface=all managed-address-configuration=no \
mtu=unspecified other-configuration=no ra-delay=3s ra-interval=3m20s-10m \
ra-lifetime=30m reachable-time=unspecified retransmit-interval=\
unspecified
/ipv6 nd prefix default
set autonomous=yes preferred-lifetime=1w valid-lifetime=4w2d
/mpls
set dynamic-label-range=16-1048575 propagate-ttl=yes
/mpls interface
set [ find default=yes ] disabled=no interface=all mpls-mtu=1508
/mpls ldp
set distribute-for-default-route=no enabled=no hop-limit=255 loop-detect=no \
lsr-id=0.0.0.0 path-vector-limit=255 transport-address=0.0.0.0 \
use-explicit-null=no
/port firmware
set directory=firmware ignore-directip-modem=no
/ppp aaa
set accounting=yes interim-update=0s use-radius=no
/queue interface
set ether1-gateway queue=only-hardware-queue
set ether2-local queue=only-hardware-queue
set ether3-local queue=only-hardware-queue
set ether4-local queue=only-hardware-queue
set ether5-local queue=only-hardware-queue
/radius incoming
set accept=no port=3799
/routing bfd interface
set [ find default=yes ] disabled=no interface=all interval=0.2s min-rx=0.2s \
multiplier=5
/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 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 ripng
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 \
timeout-timer=3m update-timer=30s
/snmp
set contact="" enabled=no engine-id="" location="" trap-generators="" \
trap-target="" trap-version=1
/system clock
set time-zone-name=Europe/Moscow
/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
set [ find port=serial0 ] channel=0 disabled=no port=serial0 term=vt102
/system identity
set name=MikroTik
/system logging
set 0 action=memory disabled=no prefix="" topics=info
set 1 action=memory disabled=no prefix="" topics=error
set 2 action=memory disabled=no prefix="" topics=warning
set 3 action=echo disabled=no prefix="" topics=critical
/system note
set note="" show-at-login=yes
/system ntp client
set enabled=yes mode=unicast primary-ntp=192.43.244.18 secondary-ntp=\
65.55.21.23
/system resource irq
set 0 cpu=auto
set 1 cpu=auto
set 2 cpu=auto
set 3 cpu=auto
/system routerboard settings
set baud-rate=115200 boot-delay=2s boot-device=nand-if-fail-then-ethernet \
boot-protocol=bootp cpu-frequency=680MHz enable-jumper-reset=yes \
enter-setup-on=any-key force-backup-booter=no silent-boot=no
/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 e-mail
set address=0.0.0.0 from=<> password="" port=25 starttls=no user=""
/tool graphing
set page-refresh=300 store-every=5min
/tool mac-server
add disabled=no interface=all
/tool mac-server mac-winbox
set [ find default=yes ] 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 secret=""
/tool sniffer
set file-limit=1000KiB file-name="" filter-ip-address="" filter-ip-protocol=\
"" filter-mac-address="" filter-mac-protocol="" filter-port="" \
filter-stream=yes interface=all memory-limit=100KiB 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
/user aaa
set accounting=yes default-group=read exclude-groups="" interim-update=0s \
use-radius=no


gmx
Модератор
Сообщения: 3290
Зарегистрирован: 01 окт 2012, 14:48

1. 2 и 3 микротики при подключении по VPN к 1 микротику должны получить IP адрес из сети первого. Допустим они получили 192.168.1.250 и 192.168.1.251. У первого микротика IP 192.168.1.1.
Временно, выключите все правила фаерволла на всех микротиках.
Проверяем пинги на всех микротиках, одни должны все друг друга пинговать

2. На 1 микротике нужно руками добавить два правила route:

route 192.168.2.0/24 192.168.1.250
route 192.168.3.0/24 192.168.1.251

На 2 микротике добавляем
route 192.168.1.0/24 192.168.1.1
route 192.168.3.0/24 192.168.1.251

На 3 микротике добавляем
route 192.168.1.0/24 192.168.1.1
route 192.168.2.0/24 192.168.1.250

3. У всех клиентов в подсетях шлюзом должен быть соответствующий микротик (условие не обязательное, но пока желательное).

4. Правило маскарадинга должно быть как можно общим. Выбирайте только scr-nat и masquerade. Потом, когда все заработает, правило можно усложнить и добавить дополнительные для каждой сети и интерфейсов. Тут уж кому как удобнее.

Все должно работать, сети должны роутится, узлы в подсетях должны пинговаться.

Возможно еще потребуется поставить arp-proxy на том интерфейсе, которым каждый микротик смотрит в СВОЮ локальную сеть (бридж, ether).

Вот вам и "Настройка фаерволла", а оказывается нужно все с нуля начинать... Забудьте вы про фаерволл вообще, добавляйте в него только те правила, которые нужны, а не те, которые найдете в инете. И вообще, фаерволлом занимаются в последнюю очередь, когда все уже настроено и работает.


alex-man-91
Сообщения: 7
Зарегистрирован: 22 апр 2015, 09:24

Может что то не понимаю, но начал делать все сначала. IpSec между первой и второй подсетью больше не поднимается. Подскажите как правильно настроить чтоб все работало?


gmx
Модератор
Сообщения: 3290
Зарегистрирован: 01 окт 2012, 14:48

Что именно вы хотите от форума? За вас все равно никто ничего не сделает.
А ответы дают только на конкретные вопросы.


alex-man-91
Сообщения: 7
Зарегистрирован: 22 апр 2015, 09:24

Делал как вы советовали. Но IpSec и связь между главным офисом и 2 микротиком не могу сделать. В чем я ошибаюсь?
 Главный офис
# jan/09/1970 04:01:00 by RouterOS 5.19
# software id = AF2M-TT4N
#
/interface bridge
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes \
disabled=no forward-delay=15s l2mtu=1520 max-message-age=20s mtu=1500 \
name=bridge priority=0x8000 protocol-mode=none transmit-hold-count=6
/interface ethernet
set 0 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DA \
master-port=none mtu=1500 name=ether1-gateway speed=100Mbps
set 1 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DB \
master-port=none mtu=1500 name=ether2-local speed=100Mbps
set 2 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DC \
master-port=none mtu=1500 name=ether3-local speed=100Mbps
set 3 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DD \
master-port=none mtu=1500 name=ether4-local speed=100Mbps
set 4 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited \
disabled=no full-duplex=yes l2mtu=1520 mac-address=00:0C:42:AF:2A:DE \
master-port=none mtu=1500 name=ether5-local speed=100Mbps
/interface ethernet switch
set 0 mirror-source=none mirror-target=none name=switch1 switch-all-ports=yes
/ip hotspot profile
set [ find default=yes ] dns-name="" hotspot-address=0.0.0.0 html-directory=\
hotspot http-cookie-lifetime=3d http-proxy=0.0.0.0:0 login-by=\
cookie,http-chap name=default rate-limit="" smtp-server=0.0.0.0 \
split-user-domain=no use-radius=no
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m name=default \
shared-users=1 status-autorefresh=1m transparent-proxy=no
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha1 disabled=no enc-algorithms=\
aes-256 lifetime=0s name=default pfs-group=modp2048
/ip pool
add name=dhcp_pool1 ranges=192.168.1.150-192.168.1.170
/ip dhcp-server
add add-arp=yes address-pool=dhcp_pool1 authoritative=after-2sec-delay \
bootp-support=static disabled=no interface=bridge lease-time=1w name=\
dhcp1
/port
set 0 baud-rate=auto data-bits=8 flow-control=none name=serial0 parity=none \
stop-bits=1
/ppp profile
set 0 change-tcp-mss=yes name=default only-one=yes remote-ipv6-prefix-pool=\
none use-compression=default use-encryption=default use-ipv6=yes \
use-mpls=default use-vj-compression=default
set 1 change-tcp-mss=yes name=default-encryption only-one=yes \
remote-ipv6-prefix-pool=none use-compression=default use-encryption=yes \
use-ipv6=yes use-mpls=default use-vj-compression=default
/interface pppoe-client
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
dial-on-demand=yes disabled=no interface=ether1-gateway max-mru=1480 \
max-mtu=1480 mrru=disabled name=pppoe-out1 password= profile=\
default service-name="" use-peer-dns=yes user=
/queue type
set 0 kind=pfifo name=default pfifo-limit=50
set 1 kind=pfifo name=ethernet-default pfifo-limit=50
set 2 kind=sfq name=wireless-default sfq-allot=1514 sfq-perturb=5
set 3 kind=red name=synchronous-default red-avg-packet=1000 red-burst=20 \
red-limit=60 red-max-threshold=50 red-min-threshold=10
set 4 kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=5
set 5 kind=none name=only-hardware-queue
set 6 kind=mq-pfifo mq-pfifo-limit=50 name=multi-queue-ethernet-default
set 7 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 [ find default=yes ] 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 [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=\
backbone type=default
/routing ospf-v3 instance
set [ find default=yes ] disabled=no distribute-default=never metric-bgp=auto \
metric-connected=20 metric-default=1 metric-other-ospf=auto metric-rip=20 \
metric-static=20 name=default redistribute-bgp=no redistribute-connected=\
no redistribute-other-ospf=no redistribute-rip=no redistribute-static=no \
router-id=0.0.0.0
/routing ospf-v3 area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=\
backbone type=default
/snmp community
set [ find default=yes ] addresses=0.0.0.0/0 authentication-password="" \
authentication-protocol=MD5 encryption-password="" encryption-protocol=\
DES name=public read-access=yes security=none write-access=no
/system logging action
set 0 memory-lines=100 memory-stop-on-full=no name=memory target=memory
set 1 disk-file-count=2 disk-file-name=log disk-lines-per-file=100 \
disk-stop-on-full=no name=disk target=disk
set 2 name=echo remember=yes target=echo
set 3 bsd-syslog=no name=remote remote=0.0.0.0 remote-port=514 src-address=\
0.0.0.0 syslog-facility=daemon syslog-severity=auto target=remote
/user group
set read name=read policy="local,telnet,ssh,reboot,read,test,winbox,password,w\
eb,sniff,sensitive,api,!ftp,!write,!policy" skin=default
set write name=write policy="local,telnet,ssh,reboot,read,write,test,winbox,pa\
ssword,web,sniff,sensitive,api,!ftp,!policy" skin=default
set full name=full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,\
winbox,password,web,sniff,sensitive,api" skin=default
/interface bridge port
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether2-local path-cost=10 point-to-point=auto priority=0x80
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether3-local path-cost=10 point-to-point=auto priority=0x80
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether4-local path-cost=10 point-to-point=auto priority=0x80
add bridge=bridge disabled=no edge=auto external-fdb=auto horizon=none \
interface=ether5-local path-cost=10 point-to-point=auto priority=0x80
add disabled=no edge=auto external-fdb=auto horizon=none interface=\
ether1-gateway path-cost=10 point-to-point=auto priority=0x80
/interface bridge settings
set use-ip-firewall=no use-ip-firewall-for-pppoe=no use-ip-firewall-for-vlan=\
no
/interface ethernet switch port
set 0 vlan-header=leave-as-is vlan-mode=fallback
set 1 vlan-header=leave-as-is vlan-mode=fallback
set 2 vlan-header=leave-as-is vlan-mode=fallback
set 3 vlan-header=leave-as-is vlan-mode=fallback
set 4 vlan-header=leave-as-is vlan-mode=fallback
set 5 vlan-header=leave-as-is vlan-mode=fallback
/interface l2tp-server server
set authentication=mschap2 default-profile=default-encryption enabled=no \
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:E3:2C:6B:F1:3C \
max-mtu=1500 mode=ip netmask=24 port=1194 require-client-certificate=no
/interface pptp-server server
set authentication=mschap1,mschap2 default-profile=default-encryption \
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=192.168.1.230/24 comment="default configuration" disabled=no \
interface=bridge network=192.168.1.0
/ip dhcp-server config
set store-leases-disk=5m
/ip dhcp-server network
add address=192.168.1.0/24 dhcp-option="" dns-server=\
91.144.150.1,91.144.148.1 gateway=192.168.1.230 ntp-server="" \
wins-server=""
/ip dns
set allow-remote-requests=no cache-max-ttl=1w cache-size=20480KiB \
max-udp-packet-size=512 servers=109.194.192.3,109.194.193.3
/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 comment="Allow IKE" disabled=no dst-port=500 \
protocol=udp
add action=accept chain=input comment="Allow IPSec-esp" disabled=no protocol=\
ipsec-esp
add action=accept chain=input comment="default configuration" disabled=no \
protocol=icmp
/ip firewall nat
add action=accept chain=srcnat disabled=yes dst-address=192.168.3.0/24 \
src-address=192.168.1.0/24
add action=masquerade chain=srcnat disabled=no src-address=192.168.1.0/24
/ip firewall service-port
set ftp disabled=yes ports=21
set tftp disabled=yes ports=69
set irc disabled=yes ports=6667
set h323 disabled=yes
set sip disabled=yes ports=5060,5061 sip-direct-media=yes
set pptp disabled=no
/ip hotspot service-port
set ftp disabled=yes ports=21
/ip ipsec peer
add address=212.33.248.119/32 auth-method=pre-shared-key dh-group=modp2048 \
disabled=no dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 \
exchange-mode=aggressive generate-policy=yes hash-algorithm=sha1 \
lifebytes=0 lifetime=1d my-id-user-fqdn="" nat-traversal=no port=500 \
proposal-check=obey
send-initial-contact=yes
add address=91.144.172.177/32 auth-method=pre-shared-key dh-group=modp1024 \
disabled=no dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 \
exchange-mode=aggressive generate-policy=yes hash-algorithm=sha1 \
lifebytes=0 lifetime=1d my-id-user-fqdn="" nat-traversal=no port=500 \
proposal-check=obey secret=HJ0e699sOIh2P172S7ajps6i620 \
send-initial-contact=yes
/ip ipsec policy
add action=encrypt disabled=no dst-address=192.168.3.0/24 dst-port=any \
ipsec-protocols=esp level=require priority=0 proposal=default protocol=\
all sa-dst-address=212.33.248.119 sa-src-address=92.255.238.204 \
src-address=192.168.1.0/24 src-port=any tunnel=yes
add action=encrypt disabled=no dst-address=192.168.2.0/24 dst-port=any \
ipsec-protocols=esp level=require priority=0 proposal=default protocol=\
all sa-dst-address=91.144.172.177 sa-src-address=92.255.238.204 \
src-address=192.168.1.0/24 src-port=any tunnel=yes
/ip neighbor discovery
set ether1-gateway disabled=yes
set ether2-local disabled=no
set ether3-local disabled=no
set ether4-local disabled=no
set ether5-local disabled=no
set bridge disabled=no
set pppoe-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=192.168.2.0/24 gateway=192.168.1.231 \
scope=30 target-scope=10
/ip smb
set allow-guests=yes comment=MikrotikSMB domain=MSHOME enabled=no interfaces=\
all
/ip smb shares
set [ find default=yes ] comment="default share" directory=/pub disabled=no \
max-sessions=10 name=pub
/ip smb users
set [ find default=yes ] disabled=no name=guest password="" read-only=yes
/ip socks
set connection-idle-timeout=2m enabled=no max-connections=200 port=1080
/ip traffic-flow
set active-flow-timeout=30m cache-entries=4k enabled=no \
inactive-flow-timeout=15s interfaces=all
/ip upnp
set allow-disable-external-interface=no enabled=no show-dummy-rule=no
/ipv6 nd
set [ find default=yes ] advertise-dns=no advertise-mac-address=yes disabled=\
no hop-limit=unspecified interface=all managed-address-configuration=no \
mtu=unspecified other-configuration=no ra-delay=3s ra-interval=3m20s-10m \
ra-lifetime=30m reachable-time=unspecified retransmit-interval=\
unspecified
/ipv6 nd prefix default
set autonomous=yes preferred-lifetime=1w valid-lifetime=4w2d
/mpls
set dynamic-label-range=16-1048575 propagate-ttl=yes
/mpls interface
set [ find default=yes ] disabled=no interface=all mpls-mtu=1508
/mpls ldp
set distribute-for-default-route=no enabled=no hop-limit=255 loop-detect=no \
lsr-id=0.0.0.0 path-vector-limit=255 transport-address=0.0.0.0 \
use-explicit-null=no
/port firmware
set directory=firmware ignore-directip-modem=no
/ppp aaa
set accounting=yes interim-update=0s use-radius=no
/queue interface
set ether1-gateway queue=ethernet-default
set ether2-local queue=ethernet-default
set ether3-local queue=ethernet-default
set ether4-local queue=ethernet-default
set ether5-local queue=ethernet-default
/radius incoming
set accept=no port=3799
/routing bfd interface
set [ find default=yes ] disabled=no interface=all interval=0.2s min-rx=0.2s \
multiplier=5
/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 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 ripng
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 \
timeout-timer=3m update-timer=30s
/snmp
set contact="" enabled=no engine-id="" location="" trap-generators="" \
trap-target="" trap-version=1
/system clock
set time-zone-name=Europe/Moscow
/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
set [ find port=serial0 ] channel=0 disabled=no port=serial0 term=vt102
/system identity
set name=MikroTik
/system logging
set 0 action=memory disabled=no prefix="" topics=info
set 1 action=memory disabled=no prefix="" topics=error
set 2 action=memory disabled=no prefix="" topics=warning
set 3 action=echo disabled=no prefix="" topics=critical
/system note
set note="" show-at-login=yes
/system ntp client
set enabled=yes mode=unicast primary-ntp=192.43.244.18 secondary-ntp=\
65.55.21.23
/system resource irq
set 0 cpu=auto
set 1 cpu=auto
set 2 cpu=auto
set 3 cpu=auto
/system routerboard settings
set baud-rate=115200 boot-delay=2s boot-device=nand-if-fail-then-ethernet \
boot-protocol=bootp cpu-frequency=680MHz enable-jumper-reset=yes \
enter-setup-on=any-key force-backup-booter=no silent-boot=no
/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 e-mail
set address=0.0.0.0 from=<> password="" port=25 starttls=no user=""
/tool graphing
set page-refresh=300 store-every=5min
/tool mac-server
add disabled=no interface=ether2-local
add disabled=no interface=ether3-local
add disabled=no interface=ether4-local
add disabled=no interface=ether5-local
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes interface=all
add disabled=no interface=ether2-local
add disabled=no interface=ether3-local
add disabled=no interface=ether4-local
add disabled=no interface=ether5-local
add disabled=no interface=bridge
/tool mac-server ping
set enabled=yes
/tool sms
set allowed-number="" channel=0 keep-max-sms=0 receive-enabled=no secret=""
/tool sniffer
set file-limit=1000KiB file-name="" filter-ip-address="" filter-ip-protocol=\
"" filter-mac-address="" filter-mac-protocol="" filter-port="" \
filter-stream=yes interface=all memory-limit=100KiB 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
/user aaa
set accounting=yes default-group=read exclude-groups="" interim-update=0s \
use-radius=no

 Конфигурация второго офиса
# jan/04/1970 00:41:46 by RouterOS 6.19
# software id = H7IX-FK8M
#
/interface bridge
add l2mtu=1520 name=bridge protocol-mode=none
/interface ethernet
set [ find default-name=ether1 ] name=ether1-gateway
set [ find default-name=ether2 ] mac-address=00:0C:42:A3:C5:73 name=\
ether2-local
set [ find default-name=ether3 ] mac-address=00:0C:42:A3:C5:74 name=\
ether3-local
set [ find default-name=ether4 ] mac-address=00:0C:42:A3:C5:75 name=\
ether4-local
set [ find default-name=ether5 ] mac-address=00:0C:42:A3:C5:76 name=\
ether5-local
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-256-cbc lifetime=0s pfs-group=\
modp2048
/port
set 0 name=serial0
/ppp profile
set 0 only-one=yes
set 1 only-one=yes
/interface pppoe-client
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
default-route-distance=1 dial-on-demand=yes disabled=no interface=\
ether1-gateway keepalive-timeout=60 max-mru=1480 max-mtu=1480 mrru=\
disabled name=pppoe-out1 password= profile=default service-name=\
"" use-peer-dns=yes user=
/ip neighbor discovery
set pppoe-out1 discover=no
/system logging action
set 0 memory-lines=100
set 1 disk-lines-per-file=100
/interface bridge port
add bridge=bridge interface=ether2-local
add bridge=bridge interface=ether3-local
add bridge=bridge interface=ether4-local
add bridge=bridge interface=ether5-local
add interface=ether1-gateway
/interface l2tp-server server
set authentication=mschap2 max-mru=1460 max-mtu=1460
/interface pptp-server server
set authentication=mschap2 enabled=yes max-mru=1460 max-mtu=1460
/ip address
add address=192.168.2.1/24 interface=bridge network=192.168.2.0
/ip dns
set cache-size=20480KiB max-udp-packet-size=512 servers=\
109.194.192.3,109.194.193.3
/ip firewall filter
add action=drop chain=input comment="Drop Invalid" connection-state=invalid \
disabled=yes
add chain=input comment="Allow IKE" dst-port=500 protocol=udp
add chain=input comment="Allow IPSec-esp" protocol=ipsec-esp
add chain=input comment="Enable GRE" disabled=yes protocol=gre
add chain=input comment="default configuration" disabled=yes protocol=icmp
add chain=input comment="Allow Established" connection-state=established \
disabled=yes in-interface=ether1-gateway
add chain=input comment="default configuration" connection-state=related \
disabled=yes in-interface=ether1-gateway
add chain=input comment="default configuration" disabled=yes in-interface=\
ether1-gateway
add action=drop chain=forward disabled=yes dst-port=80 protocol=tcp \
src-address=192.168.3.2
/ip firewall nat
add action=masquerade chain=srcnat src-address=192.168.2.0/24
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
/ip ipsec peer
# Unsafe configuration, suggestion to use certificates
add address=92.255.238.204/32 dh-group=modp2048 enc-algorithm=aes-256 \
exchange-mode=aggressive nat-traversal=no passive=yes secret=\
HJ0e699sOIh2P172S7ajps6i620
/ip ipsec policy
set (unknown) dst-address=192.168.1.0/24 sa-dst-address=92.255.238.204 \
sa-src-address=91.144.172.177 src-address=192.168.2.0/24 tunnel=yes
/ip proxy
set max-cache-size=none parent-proxy=0.0.0.0
/ip route
add distance=1 dst-address=192.168.1.0/24 gateway=192.168.1.230
add distance=1 dst-address=192.168.2.0/24 gateway=192.168.1.231
/ip upnp
set allow-disable-external-interface=no
/system clock
set time-zone-name=Europe/Moscow
/system ntp client
set enabled=yes primary-ntp=192.43.244.18 secondary-ntp=65.55.21.23
/tool bandwidth-server
set enabled=no
/tool mac-server
add


gmx
Модератор
Сообщения: 3290
Зарегистрирован: 01 окт 2012, 14:48

Ох елки!!!


Такие портянки....
Не я не помощник, я пытаюсь быть в отпуске, а тут столько изучать нужно.


Предлагаю вместо IpSec поднять простой PPPtP. Это две строчки. Когда с маршрутами разберетесь замените туннель на IpSec.


Ответить