Настройка firewall.
Добавлено: 07 мар 2014, 06:08
1. необходимо запретить доступ до сетей за микротиком из Wi-fi и интернет.
2. вроде правила запилил, получилось запретить доступ только до сети 192.168.88.0/24.
3.
/interface vrrp
add authentication=simple interface=ether1 interval=5s name=vrrp1 password=wifi123 version=2 vrid=51
add authentication=simple interface=ether2 interval=5s name=vrrp2 password=wififw version=2 vrid=50
/interface vlan
add interface=ether11 l2mtu=1586 name=vlan1650 vlan-id=1650
add interface=ether1 l2mtu=1586 name=vlan1651 vlan-id=1651
add interface=ether2 l2mtu=1586 name=vlan1654 vlan-id=1654
/ip hotspot profile
add dns-name=test.ru hotspot-address=10.50.0.1 login-by=https name=hsprof1 radius-interim-update=15m ssl-certificate=cert_1 use-radius=yes
/ip pool
add name=hs-pool-1 ranges=10.50.5.1-10.50.63.254
/ip address
add address=10.65.0.6/22 interface=ether11 network=10.65.0.0
add address=10.50.0.6/18 interface=ether1 network=10.50.0.0
add address=10.50.0.1/32 interface=vrrp1 network=10.50.0.1
add address=192.168.1.245/28 interface=ether2 network=192.168.1.240
add address=192.168.1.244/32 interface=vrrp2 network=192.168.1.244
add address=192.168.88.1/24 interface=ether12 network=192.168.88.0
/ip dhcp-server network
add address=10.50.0.0/18 comment="hotspot network" gateway=10.50.0.1
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes
add action=drop chain=hs-input dst-address=10.65.0.0/22
add action=drop chain=hs-input dst-address=192.168.88.0/24
add action=drop chain=hs-input dst-address=10.137.1.240/28
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes to-addresses=0.0.0.0
add action=masquerade chain=srcnat comment="masquerade hotspot network" disabled=yes src-address=10.50.0.0/18 to-addresses=0.0.0.0
add action=masquerade chain=srcnat comment="masquerade hotspot network" disabled=yes src-address=10.50.0.0/18 to-addresses=0.0.0.0
/ip hotspot
add address-pool=hs-pool-1 addresses-per-mac=3 disabled=no idle-timeout=1w interface=vrrp1 keepalive-timeout=1w name=hotspot1 profile=hsprof1
/ip route
add distance=1 gateway=192.168.1.241
4. да.
по схеме, на микротике поднято два vrrp, один в сторону data wifi сети, второй в сторону маршрутизатора.
NAT так же будет осуществятся на маршрутизаторе.
в данный момент спокойно из сети вай-фай могу зайти на IP микротика и маршрутизатора 10.50.0.6 192.168.1.241
2. вроде правила запилил, получилось запретить доступ только до сети 192.168.88.0/24.
3.
/interface vrrp
add authentication=simple interface=ether1 interval=5s name=vrrp1 password=wifi123 version=2 vrid=51
add authentication=simple interface=ether2 interval=5s name=vrrp2 password=wififw version=2 vrid=50
/interface vlan
add interface=ether11 l2mtu=1586 name=vlan1650 vlan-id=1650
add interface=ether1 l2mtu=1586 name=vlan1651 vlan-id=1651
add interface=ether2 l2mtu=1586 name=vlan1654 vlan-id=1654
/ip hotspot profile
add dns-name=test.ru hotspot-address=10.50.0.1 login-by=https name=hsprof1 radius-interim-update=15m ssl-certificate=cert_1 use-radius=yes
/ip pool
add name=hs-pool-1 ranges=10.50.5.1-10.50.63.254
/ip address
add address=10.65.0.6/22 interface=ether11 network=10.65.0.0
add address=10.50.0.6/18 interface=ether1 network=10.50.0.0
add address=10.50.0.1/32 interface=vrrp1 network=10.50.0.1
add address=192.168.1.245/28 interface=ether2 network=192.168.1.240
add address=192.168.1.244/32 interface=vrrp2 network=192.168.1.244
add address=192.168.88.1/24 interface=ether12 network=192.168.88.0
/ip dhcp-server network
add address=10.50.0.0/18 comment="hotspot network" gateway=10.50.0.1
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes
add action=drop chain=hs-input dst-address=10.65.0.0/22
add action=drop chain=hs-input dst-address=192.168.88.0/24
add action=drop chain=hs-input dst-address=10.137.1.240/28
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes to-addresses=0.0.0.0
add action=masquerade chain=srcnat comment="masquerade hotspot network" disabled=yes src-address=10.50.0.0/18 to-addresses=0.0.0.0
add action=masquerade chain=srcnat comment="masquerade hotspot network" disabled=yes src-address=10.50.0.0/18 to-addresses=0.0.0.0
/ip hotspot
add address-pool=hs-pool-1 addresses-per-mac=3 disabled=no idle-timeout=1w interface=vrrp1 keepalive-timeout=1w name=hotspot1 profile=hsprof1
/ip route
add distance=1 gateway=192.168.1.241
4. да.
по схеме, на микротике поднято два vrrp, один в сторону data wifi сети, второй в сторону маршрутизатора.
NAT так же будет осуществятся на маршрутизаторе.
в данный момент спокойно из сети вай-фай могу зайти на IP микротика и маршрутизатора 10.50.0.6 192.168.1.241