Может ли VPN "засыпать"? Есть VPN между двумя точками, по IPsec. И он постоянно поднят в таблице статус established. Но связь появляется только после того как из одной сети "главной" пингую вторую, если же начать пинг со второй то он не проходит. В чём может быть проблема? Надеюсь понятно объяснил) И еще вопрос не понимаю за что отвечает параметр proposal check, в чём разница между: strict obey claim exact Влияют эти параметры на то что я описал выше или нет? Сейчас у меня выставлен: strict.
Прикладываю конфиг. Пока с этого основного маршрутизатора не пропингую другой, там пинги на основной не проходят. пинги не проходят с Sormovo и Kstovo, с остальных тоже наверно не проходят но как-то реже. Код: # model = RB750Gr3 # serial number = xxxxxxxxxx /interface bridge add comment="Lan 10" name="bridge 10" add comment=SIP name="bridge SIP" add admin-mac=xx:xx:xx:xx:xx:xx auto-mac=no comment=defconf name=bridge100 /interface ethernet set [ find default-name=ether1 ] comment=WAN name=ether1-wan set [ find default-name=ether2 ] comment="LAN 100" name=ether2-lan set [ find default-name=ether3 ] comment="LAN 10" name=ether3-lan set [ find default-name=ether4 ] comment="LAN 100 - Camera" name=\ ether4-lan-camera set [ find default-name=ether5 ] comment=SIP name=ether5-lan /interface pppoe-client add add-default-route=yes comment=Internet disabled=no interface=ether1-wan \ name=pppoe-out-internet password=xxxxxx use-peer-dns=yes user=\ xxxxxxxxx /interface list add comment=defconf name=WAN add comment=defconf name=LAN /interface wireless security-profiles set [ find default=yes ] supplicant-identity=MikroTik /ip dhcp-server add disabled=no interface="bridge 10" lease-time=8h name="Lan 10" /ip hotspot profile set [ find default=yes ] html-directory=flash/hotspot /ip ipsec policy group add name=group-for-IPsec /ip ipsec profile add dh-group=modp768 enc-algorithm=aes-256 hash-algorithm=md5 lifetime=8h \ name=gpnti-IPsec proposal-check=strict /ip ipsec peer add address=95.xx.xx.xx/32 disabled=yes name=Archive profile=gpnti-IPsec add address=89.xx.xx.xx/32 name=Sormovo profile=gpnti-IPsec \ send-initial-contact=no add address=89.xx.xx.xx/32 name=Lenina profile=gpnti-IPsec add address=37.xx.xx.xx/32 name=Kstovo profile=gpnti-IPsec /ip ipsec proposal set [ find default=yes ] disabled=yes add auth-algorithms=md5 enc-algorithms=aes-256-cbc lifetime=8h name=\ proposal-for-IPsec pfs-group=none /ip pool add name="Lan 100" ranges=10.10.100.200-10.10.100.250 add name="Lan SIP" ranges=192.168.2.2-192.168.2.100 /ip dhcp-server add address-pool="Lan 100" authoritative=after-2sec-delay disabled=no \ interface=bridge100 lease-time=8h name="Lan 100" add address-pool="Lan SIP" authoritative=after-2sec-delay disabled=no \ interface="bridge SIP" lease-time=8h name="Lan SIP" /user group set full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,pas\ sword,web,sniff,sensitive,api,romon,dude,tikapp" /interface bridge port add bridge=bridge100 comment=defconf interface=ether2-lan add bridge="bridge 10" comment=defconf interface=ether3-lan add bridge=bridge100 comment=defconf interface=ether4-lan-camera add bridge="bridge SIP" comment=defconf interface=ether5-lan /ip neighbor discovery-settings set discover-interface-list=LAN /interface list member add comment=defconf interface=bridge100 list=LAN add comment=defconf interface=ether1-wan list=WAN add interface=pppoe-out-internet list=WAN /ip address add address=10.10.100.1/24 comment=defconf interface=bridge100 network=\ 10.10.100.0 add address=192.168.2.200/24 comment=SIP interface="bridge SIP" network=\ 192.168.2.0 add address=10.10.10.1/24 interface="bridge 10" network=10.10.10.0 add address=10.10.10.250/24 comment="\C4\EE\EF. \F8\EB\FE\E7 \E4\EB\FF \EA\E0\ \EC\E5\F0 \E8 \C1\E0\ED\EA\EE\E2\F1\EA\E8\F5 \EA\EB\E8\E5\ED\F2\EE\E2" \ interface="bridge 10" network=10.10.10.0 add address=10.10.100.250/24 comment="\C4\EE\EF. \F8\EB\FE\E7 \E4\EB\FF VPN" \ interface=bridge100 network=10.10.100.0 /ip dhcp-client add comment=defconf interface=ether1-wan add interface=bridge100 /ip dhcp-server network add address=10.10.10.0/24 dns-server=10.10.10.4 gateway=10.10.10.1 netmask=24 add address=10.10.100.0/24 comment=defconf dns-server=10.10.100.4 gateway=\ 10.10.100.1 netmask=24 add address=192.168.2.0/24 dns-server=8.8.8.8 gateway=192.168.2.200 /ip dns set allow-remote-requests=yes /ip dns static add address=10.10.100.1 name=router.lan type=A /ip firewall filter add action=accept chain=input comment=\ "defconf: accept established,related,untracked" connection-state=\ established,related,untracked add action=drop chain=input comment="defconf: drop invalid" connection-state=\ invalid add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp add action=drop chain=input comment="defconf: drop all not coming from LAN" \ in-interface-list=!LAN add action=accept chain=forward comment="defconf: accept in ipsec policy" \ ipsec-policy=in,ipsec add action=accept chain=forward comment="defconf: accept out ipsec policy" \ ipsec-policy=out,ipsec add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \ connection-state=established,related add action=accept chain=forward comment=\ "defconf: accept established,related, untracked" connection-state=\ established,related,untracked add action=drop chain=forward comment="defconf: drop invalid" \ connection-state=invalid add action=drop chain=forward comment=\ "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \ connection-state=new in-interface-list=WAN /ip firewall nat add action=masquerade chain=srcnat comment="defconf: masquerade" \ ipsec-policy=out,none out-interface-list=WAN add action=accept chain=srcnat comment=Lenina dst-address=192.168.10.0/24 \ src-address=10.10.100.0/24 add action=accept chain=srcnat comment=Kstovo dst-address=192.168.0.0/24 \ src-address=10.10.100.0/24 add action=accept chain=srcnat comment=Archive dst-address=192.168.33.0/24 \ src-address=10.10.100.0/24 add action=accept chain=srcnat comment=Sormovo dst-address=10.10.39.0/24 \ src-address=10.10.100.0/24 /ip firewall service-port set sip disabled=yes /ip ipsec identity add peer=Kstovo policy-template-group=group-for-IPsec secret=xxxxxxx add peer=Lenina policy-template-group=group-for-IPsec secret=xxxxxxx add disabled=yes peer=Archive policy-template-group=group-for-IPsec secret=\ xxxxxxx add peer=Sormovo policy-template-group=group-for-IPsec secret=xxxxxxx /ip ipsec policy set 0 disabled=yes add comment=Lenina dst-address=192.168.10.0/24 proposal=proposal-for-IPsec \ sa-dst-address=89.xx.1xx.xx sa-src-address=89.xx.2xx.xx src-address=\ 10.10.100.0/24 tunnel=yes add comment=Kstovo dst-address=192.168.0.0/24 proposal=proposal-for-IPsec \ sa-dst-address=37.xx.xx.xx sa-src-address=89.xx.xx.xx src-address=\ 10.10.100.0/24 tunnel=yes add comment=Archive disabled=yes dst-address=192.168.33.0/24 proposal=\ proposal-for-IPsec sa-dst-address=95.xx.xx.xx sa-src-address=\ 89.xx.xx.xx src-address=10.10.100.0/24 tunnel=yes add comment=Sormovo dst-address=10.10.39.0/24 proposal=proposal-for-IPsec \ sa-dst-address=89.xx.1xx.xx sa-src-address=89.xx.3xx.xx src-address=\ 10.10.100.0/24 tunnel=yes /ip route add comment=Sormovo distance=1 dst-address=10.10.39.0/24 gateway=bridge100 add comment=Kstovo distance=1 dst-address=192.168.0.0/24 gateway=bridge100 add comment=Lenina distance=1 dst-address=192.168.10.0/24 gateway=bridge100 /ip service set telnet disabled=yes set ftp disabled=yes set api disabled=yes set winbox address=10.10.10.0/24,10.10.100.0/24,89.xx.xx.xx/32 set api-ssl disabled=yes /ip traffic-flow target add port=1234 version=5 /system clock set time-zone-name=Europe/Moscow /system ntp client set enabled=yes primary-ntp=193.171.23.63 secondary-ntp=85.114.26.194 /tool mac-server set allowed-interface-list=LAN /tool mac-server mac-winbox set allowed-interface-list=LAN
Нашёл такую вещь при включенном правиле Код: add action=drop chain=input comment="defconf: drop all not coming from LAN" \ in-interface-list=!LAN происходит следующее: Код: input: in:pppoe-out-internet out(unknown 0), src-mac xx:xx:xx:xx:xx:xx, proto 50, 89.xx.1xx.xx->.xx.2xx.xx, len 120 отключил правило и пинг пошёл. Но на другом роутере тоже от mikrotik такого не происходит, хотя настройки файрвола идентичные. В чём тут может быть проблема кто подскажет? Правило выключать полностью не хочется, может его как-то отредактировать?
Отключил ssh, теперь пытаются по winbox пробиться, но ограничение по возможным ip им не даёт проходить. Насколько это вообще опасно? или безопасно?
Может попробуете VPN l2tp+ipsec + OSPF ? Он настраивается легче и не надо будет правила файрвола выключать.
Спасибо за отклик, чуть больше разобрался в файрволе добавил правило для разрешения VPN перед дропом и все отлично заработало) Теперь правило не нужно выключать %)
п привет, а как это сделать? я бы не сказал, что vpn "засыпает" постоянно, но через раз такое бывает я прочитал пару статей что делать с впн, но толком ничего не понял(
Создаешь список доверенных VPN адресов и добавляешь это правило в файрволл до дропа, я третьим его сделал: Код: add action=accept chain=input in-interface-list=WAN src-address-list=\ "VPN List" Возможно ещё есть какой-то способ.