Обнаружена блокировка рекламы: Наш сайт существует благодаря показу онлайн-рекламы нашим посетителям. Пожалуйста, подумайте о поддержке нас, отключив блокировщик рекламы на нашем веб-сайте.
Обсуждение ПО и его настройки
vqd
Модератор
Сообщения: 3605 Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:
wolf_ktl
Сообщения: 417 Зарегистрирован: 25 июн 2013, 18:12
03 мар 2014, 08:20
Это конфигурация, которую надо прятать под спойлер, потому что не слишком приятно перед каждым просмотром темы крутить три метра поста
Код: Выделить всё
# software id = A2AN-L463 # /interface bridge add name=bridge_hotspot add admin-mac=D4:CA:6D:4C:10:E6 auto-mac=no l2mtu=1598 name=bridge_lan \ protocol-mode=rstp /interface ethernet set 0 comment=LAN1 mac-address=00:0C:42:B7:C0:98 name=LAN-beeline set 1 arp=proxy-arp comment=LAN2 name=LAN2 set 2 comment="LAN Flex" mac-address=D4:CA:6D:4C:10:E6 name=WAN-FLEXLAN3 set 3 arp=proxy-arp set 4 arp=proxy-arp set 5 name=ether6-master-local set 6 master-port=ether6-master-local name=ether7-slave-local set 7 master-port=ether6-master-local name=ether8-slave-local set 8 name=ether9-slave-local set 9 disabled=yes name=ether10-slave-local set 10 name=sfp1-gateway /interface l2tp-client add connect-to=192.168.222.10 name=l2tp-test password=fsf user=sdfsd /interface l2tp-server add name=l2tp-Brize user=brize add name=l2tp-lenina125 user=lenina125 add name=l2tp-lifter user=lifter add name=l2tp-wolfhome user=wolfhome add name=l2tp-ykdav user=ykdav /ip neighbor discovery set LAN-beeline comment=LAN1 discover=no set LAN2 comment=LAN2 set WAN-FLEXLAN3 comment="LAN Flex" set sfp1-gateway discover=no /interface wireless security-profiles set [ find default=yes ] authentication-types=\ wpa-psk,wpa2-psk,wpa-eap,wpa2-eap eap-methods="" mode=dynamic-keys \ supplicant-identity=MikroTik wpa-pre-shared-key=midas \ wpa2-pre-shared-key=midas add authentication-types=wpa-psk,wpa2-psk eap-methods="" \ management-protection=allowed name=hotpost supplicant-identity="" add authentication-types=wpa-psk,wpa2-psk eap-methods="" \ management-protection=allowed mode=dynamic-keys name=midas2013 \ supplicant-identity="" wpa-pre-shared-key=midas \ wpa2-pre-shared-key=midas /interface wireless set 0 adaptive-noise-immunity=ap-and-client-mode band=2ghz-b/g/n country=\ russia default-authentication=no default-forwarding=no disabled=no \ distance=indoors l2mtu=2290 mode=ap-bridge name=wlan_wifi \ security-profile=hotpost ssid=MIDAS_WI-FI_FREE tx-power=15 tx-power-mode=\ all-rates-fixed wireless-protocol=802.11 add default-authentication=no default-forwarding=no disabled=no l2mtu=2290 \ mac-address=D6:CA:6D:04:AA:7A master-interface=wlan_wifi name=wlan_work \ security-profile=midas2013 ssid=MIDAS wds-cost-range=0 wds-default-cost=0 /ip hotspot profile add hotspot-address=10.5.50.1 login-by=http-chap,trial name=hsprof1 /ip hotspot user profile set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \ mac-cookie-timeout=3d rate-limit=3m/3m shared-users=unlimited /ip pool add name=hs-pool-27 ranges=10.5.50.2-10.5.50.254 add name=dhcp_pool2 ranges=192.168.3.20-192.168.3.60 /ip dhcp-server add address-pool=hs-pool-27 disabled=no interface=wlan_wifi lease-time=1h \ name=dhcp4 /ip hotspot add address-pool=hs-pool-27 disabled=no interface=wlan_wifi name=hotspot1 \ profile=hsprof1 /ip pool add name=dhcp_pool1 next-pool=dhcp_pool2 ranges=192.168.3.145-192.168.3.200 /ip dhcp-server add address-pool=dhcp_pool1 disabled=no interface=bridge_lan name=dhcp1 /port set 0 name=serial0 /ppp profile add change-tcp-mss=yes name=flex remote-address=127.0.1.3 wins-server=0.0.0.0 add change-tcp-mss=no name=beeline remote-address=127.0.1.2 use-compression=\ no use-encryption=no use-vj-compression=no add change-tcp-mss=no name=vpn use-compression=no use-encryption=no \ use-vj-compression=no /interface l2tp-client add connect-to=195.14.38.12 disabled=no max-mru=1460 max-mtu=1460 name=\ l2tp-beeline password=133 profile=beeline user=1312 add connect-to=10.255.255.254 disabled=no max-mru=1500 max-mtu=1460 name=\ l2tp-flex password=1312 profile=flex user=123123 /interface bridge port add bridge=bridge_lan interface=LAN2 add bridge=bridge_lan interface=wlan_work add bridge=bridge_hotspot interface=ether9-slave-local /interface l2tp-server server set default-profile=vpn enabled=yes max-mru=1420 max-mtu=1460 /interface pptp-server server set enabled=yes max-mru=1500 max-mtu=1500 /interface wireless access-list add forwarding=no signal-range=-90..120 /ip address add address=192.168.3.1/24 comment="default configuration" interface=\ bridge_lan network=192.168.3.0 add address=10.224.122.7/24 interface=WAN-FLEXLAN3 network=10.224.122.0 add address=10.5.50.1/24 comment="hotspot network" interface=wlan_wifi \ network=10.5.50.0 /ip dhcp-client add add-default-route=no comment=beeline dhcp-options=hostname,clientid \ disabled=no interface=LAN-beeline /ip dhcp-server network add address=10.5.50.0/24 comment="hotspot network" dns-server=10.5.50.1 \ gateway=10.5.50.1 add address=192.168.3.0/24 comment="default configuration" dns-server=\ 192.168.3.93,192.168.3.1 gateway=192.168.3.1 /ip dns set allow-remote-requests=yes servers=8.8.8.8,4.2.2.4 /ip dns static add address=192.168.88.1 name=router /ip firewall address-list add address=192.168.3.0/24 list=!LocalNet /ip firewall filter add chain=output dst-port=3333 protocol=tcp add chain=input protocol=tcp src-port=3333 add chain=input comment=RDP dst-port=5555 protocol=tcp add chain=forward comment=443 dst-port=443 protocol=tcp add chain=forward comment=TimeSinc dst-port=123 protocol=udp add chain=forward comment="Allow smtp for server (in)" protocol=tcp src-port=\ 25 add chain=forward comment="Allow smtp for server (out)" dst-port=25 protocol=\ tcp add chain=forward comment="Allow pop for server (in)" protocol=tcp src-port=\ 110 add chain=forward comment="Allow pop for server (out)" dst-port=110 protocol=\ tcp add chain=input comment="L2TP Beeline" connection-mark="ISP 1 -> Input" \ in-interface=l2tp-beeline port=1701,500,4500 protocol=udp add chain=input comment="L2TP Flex" in-interface=l2tp-flex port=1701,500,4500 \ protocol=udp routing-mark=ISP2 add chain=input comment=L2TP disabled=yes port=1701,500,4500 protocol=udp add chain=forward add action=drop chain=input comment=Atack dst-port=53 in-interface=\ l2tp-beeline protocol=udp add action=drop chain=input dst-port=53 in-interface=l2tp-flex protocol=udp add action=passthrough chain=unused-hs-chain comment=\ "place hotspot rules here" /ip firewall mangle add action=mark-connection chain=input in-interface=l2tp-beeline \ new-connection-mark="ISP 1 -> Input" add action=mark-routing chain=output connection-mark="ISP 1 -> Input" \ new-routing-mark=ISP1 passthrough=no add action=mark-connection chain=input in-interface=l2tp-flex \ new-connection-mark="ISP 2 -> Input" add action=mark-routing chain=output connection-mark="ISP 2 -> Input" \ new-routing-mark=ISP2 add action=change-mss chain=forward new-mss=1300 out-interface=l2tp-beeline \ protocol=tcp tcp-flags=syn add action=change-mss chain=forward in-interface=l2tp-beeline new-mss=1300 \ protocol=tcp tcp-flags=syn add chain=forward in-interface=l2tp-flex protocol=tcp add chain=forward out-interface=l2tp-flex protocol=tcp /ip firewall nat add action=dst-nat chain=dstnat comment="mail 443" dst-port=443 in-interface=\ l2tp-beeline protocol=tcp to-addresses=192.168.3.96 to-ports=443 add action=dst-nat chain=dstnat comment="mail local 443" dst-address=\ 93.81.245.45 dst-port=443 protocol=tcp to-addresses=192.168.3.96 \ to-ports=443 add action=dst-nat chain=dstnat comment="web mail" dst-port=80 in-interface=\ l2tp-beeline protocol=tcp to-addresses=192.168.3.96 to-ports=80 add action=dst-nat chain=dstnat comment="web mail local" dst-address=\ 93.81.245.45 dst-port=80 protocol=tcp to-addresses=192.168.3.96 to-ports=\ 80 add action=dst-nat chain=dstnat comment="NAT for smtp local" dst-address=\ 93.81.245.45 dst-port=25 protocol=tcp to-addresses=192.168.3.96 to-ports=\ 25 add action=dst-nat chain=dstnat comment="Nat fo smtp 25 " dst-port=25 \ in-interface=l2tp-beeline protocol=tcp to-addresses=192.168.3.96 \ to-ports=25 add action=dst-nat chain=dstnat comment="Nat fo smtp pop3 local" dst-address=\ 93.81.245.45 dst-port=110 protocol=tcp to-addresses=192.168.3.96 \ to-ports=110 add action=dst-nat chain=dstnat comment="Nat fo pop3" dst-port=110 \ in-interface=l2tp-beeline protocol=tcp to-addresses=192.168.3.96 \ to-ports=110 add action=dst-nat chain=dstnat disabled=yes dst-address=93.81.245.45 \ dst-port=993 in-interface=l2tp-beeline protocol=tcp to-addresses=\ 192.168.3.96 to-ports=993 add action=dst-nat chain=dstnat disabled=yes dst-address=93.81.245.45 \ dst-port=143 in-interface=l2tp-beeline protocol=tcp to-addresses=\ 192.168.3.96 to-ports=143 add action=dst-nat chain=dstnat comment=jabber dst-port=5222 in-interface=\ l2tp-beeline protocol=tcp to-addresses=192.168.3.97 to-ports=5222 add action=dst-nat chain=dstnat comment="jabber 2" disabled=yes dst-port=5269 \ protocol=tcp to-addresses=192.168.3.96 to-ports=5269 add action=dst-nat chain=dstnat comment="NAT for smtp" disabled=yes dst-port=\ 465 protocol=tcp to-addresses=192.168.3.96 to-ports=25 add action=dst-nat chain=dstnat comment="NAT for smtp" disabled=yes dst-port=\ 587 protocol=tcp to-addresses=192.168.3.96 to-ports=25 add action=dst-nat chain=dstnat comment="Server GLAVSERVER Port=3389 " \ dst-port=5555 in-interface=l2tp-beeline protocol=tcp to-addresses=\ 192.168.3.94 to-ports=3389 add action=dst-nat chain=dstnat comment="Server GLAVSERVER Port=3389 " \ dst-port=5555 in-interface=l2tp-flex protocol=tcp to-addresses=\ 192.168.3.94 to-ports=3389 add action=dst-nat chain=dstnat dst-port=9999 protocol=tcp to-addresses=\ 192.168.3.100 to-ports=5900 add action=masquerade chain=srcnat comment="masquerade hotspot network" \ src-address=192.168.3.0/24 to-addresses=0.0.0.0 add action=masquerade chain=srcnat comment="masquerade hotspot network" \ src-address=10.5.50.0/24 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="ISP 1" out-interface=l2tp-beeline add action=masquerade chain=srcnat comment="ISP 2" out-interface=l2tp-flex /ip firewall service-port set sip disabled=yes /ip hotspot user add name=admin /ip route add comment="\ED\E5 \F3\E4\E0\EB\FF\F2\FC" distance=1 dst-address=8.8.8.8/32 \ gateway=127.0.1.2 routing-mark=ISP1 add distance=1 dst-address=4.4.4.4/32 gateway=127.0.1.3 routing-mark=ISP2 add distance=1 dst-address=10.224.87.0/24 gateway=WAN-FLEXLAN3 routing-mark=\ ISP2 add comment=beeline distance=1 gateway=127.0.1.2 add comment=Flex distance=2 gateway=127.0.1.3 add comment=Home disabled=yes distance=1 gateway=192.168.10.1 add comment="to veriya" disabled=yes distance=1 dst-address=10.88.224.0/24 \ gateway=10.88.88.1 add comment="ping to veria" disabled=yes distance=1 dst-address=\ 10.88.225.0/24 gateway=10.88.224.1 add comment=flex distance=1 dst-address=10.255.255.254/32 gateway=\ 10.224.122.1 add comment="Marshrut do brize" distance=1 dst-address=192.168.4.0/24 \ gateway=192.168.222.4 add comment="Marshrut do lenina125" distance=1 dst-address=192.168.8.0/24 \ gateway=192.168.222.8 add comment="route home" distance=1 dst-address=192.168.10.0/24 gateway=\ 192.168.223.10 add comment=beeline_vpnserber distance=1 dst-address=195.14.38.0/24 gateway=\ 10.88.88.1 add comment=" http://maps.rosreestr.ru/PortalOnline/" disabled=yes distance=1 \ dst-address=195.161.118.12/32 gateway=127.0.1.3 /ip route rule add action=unreachable comment="Block Hostpot" dst-address=10.5.50.0/24 \ src-address=192.168.3.0/24 add action=unreachable comment="Block Hostpot" dst-address=192.168.3.0/24 \ src-address=10.5.50.0/24 /ip service set telnet disabled=yes set ftp disabled=yes set www port=9090 set ssh disabled=yes /lcd interface set sfp1-gateway interface=sfp1-gateway set LAN-beeline interface=LAN-beeline set LAN2 interface=LAN2 set WAN-FLEXLAN3 interface=WAN-FLEXLAN3 set ether4 interface=ether4 set ether5 interface=ether5 set ether6-master-local interface=ether6-master-local set ether7-slave-local interface=ether7-slave-local set ether8-slave-local interface=ether8-slave-local set ether9-slave-local interface=ether9-slave-local set ether10-slave-local interface=ether10-slave-local set wlan_wifi interface=wlan_wifi /lcd interface pages set 0 interfaces="sfp1-gateway,LAN-beeline,LAN2,WAN-FLEXLAN3,ether4,ether5,eth\ er6-master-local,ether7-slave-local,ether8-slave-local,ether9-slave-local,\ ether10-slave-local,wlan_wifi" /ppp secret add local-address=192.168.222.1 name=wolfhome2 password=Wolf1111 \ remote-address=192.168.222.11 service=l2tp /routing rip neighbor add address=192.168.222.10 add address=192.168.222.4 add address=192.168.222.8 add address=192.168.222.2 add address=192.168.222.6 /routing rip network add network=192.168.3.0/24 add network=192.168.222.0/24 add network=192.168.99.0/24 /system clock set time-zone-name=Europe/Moscow /system identity set name=MikroTik-Midas /system logging set 2 action=disk /system ntp client set enabled=yes mode=unicast primary-ntp=62.149.2.1 secondary-ntp=62.149.2.2 /tool mac-server set [ find default=yes ] disabled=yes add interface=LAN2 add interface=WAN-FLEXLAN3 add interface=ether4 add interface=ether5 add interface=ether6-master-local add interface=ether7-slave-local add interface=ether8-slave-local add interface=ether9-slave-local add interface=wlan_wifi add interface=bridge_lan /tool mac-server mac-winbox set [ find default=yes ] disabled=yes add interface=LAN2 add interface=WAN-FLEXLAN3 add interface=ether4 add interface=ether5 add interface=ether6-master-local add interface=ether7-slave-local add interface=ether8-slave-local add interface=ether9-slave-local add interface=wlan_wifi add interface=bridge_lan /tool netwatch add down-script="ip route disable numbers=[find comment=beeline]\r\ \n" host=8.8.8.8 interval=10s up-script="ip route enable numbers=[find com\ ment=beeline]\r\ \n/"
vqd
Модератор
Сообщения: 3605 Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:
03 мар 2014, 08:42
Ужас какой с маршрутизацией разберитесь и все будет работать
wolf_ktl
Сообщения: 417 Зарегистрирован: 25 июн 2013, 18:12
03 мар 2014, 09:06
Смысл в том, что при ошибка при попытке подключения второго VPN туннеля в логах пишется IP адрес основного канала интернета
vqd
Модератор
Сообщения: 3605 Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:
03 мар 2014, 09:08
ну так оно очевидно т.к. у вас там понатыканно
wolf_ktl
Сообщения: 417 Зарегистрирован: 25 июн 2013, 18:12
11 мар 2014, 18:54
Что только не делал в ответ приходит l2tp,debug,packet rcvd control message (ack) from адресс провайдера (через который по умолчанию работает инет):1701
wolf_ktl
Сообщения: 417 Зарегистрирован: 25 июн 2013, 18:12
20 мар 2014, 15:20
wolf_ktl писал(а): Помогите ... Я понимаю мусолился очень много раз ...
Правильно ли я за маркировал пакеты ?
"ip firewall mangle print"
0 ;;; Mark Beeeline chain=forward action=mark-connection new-connection-mark=ISP1_c passthrough=yes in-interface=l2tp-beeline 1 ;;; Mark Beliine chain=prerouting action=mark-routing new-routing-mark=ISP1_r passthrough=yes src-address=192.168.3.0/24 connection-mark=ISP1_c 2 ;;; Mark Flex chain=forward action=mark-connection new-connection-mark=ISP2_c passthrough=yes in-interface=l2tp-flex 3 ;;; Mark Flex chain=prerouting action=mark-routing new-routing-mark=ISP2_r passthrough=yes src-address=192.168.3.0/24 connection-mark=ISP2_c 4 chain=forward action=change-mss new-mss=1300 passthrough=yes tcp-flags=syn protocol=tcp out-interface=l2tp-beeline 5 chain=forward action=change-mss new-mss=1300 passthrough=yes tcp-flags=syn protocol=tcp in-interface=l2tp-beeline
Заметил особенность что в
2 ;;; Mark Flex
chain=forward action=mark-connection new-connection-mark=ISP2_c
passthrough=yes in-interface=l2tp-flex
3 ;;; Mark Flex
chain=prerouting action=mark-routing new-routing-mark=ISP2_r
passthrough=yes src-address=192.168.3.0/24 connection-mark=ISP2_c
не маркирует преходящие пакеты
Последний раз редактировалось
wolf_ktl 20 мар 2014, 15:29, всего редактировалось 1 раз.
vqd
Модератор
Сообщения: 3605 Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:
20 мар 2014, 15:26
я недавно выкладывал готовый конфиг на работу с двумя провайдерами, как на инпуте так и на форварде.
viewtopic.php?f=15&t=5183
wolf_ktl
Сообщения: 417 Зарегистрирован: 25 июн 2013, 18:12
20 мар 2014, 16:11
Какая -та аномалия... пингую второй IP в firewall пакеты не бегут по входящему интерфейсу .. а из дома пинг проходит на ура