OpenVPN microtic - pfsense. Не видна сеть.
Добавлено: 14 авг 2019, 22:35
rline
Здравствуйте, уважаемые!
Помогите пожалуйста разобраться с настройкой openvpn. Изначально я всё сделал вот по этой инструкции https://blog.itspec.ua/2019/01/16/nastr ... nnye-seti/
Pfsense выступает в качестве сервера, microtic в качестве клиента. Само соединение openvpn работает, но пинги между компьютерами обоих филиалов не идут. Пинг идёт только с микротика, если выбрать созданный интерфейс openvpn. Я предполагаю, что какой-то маршрут надо прописать, но я в микротике совсем новичок, поэтому даже не знаю куда копать.
Вот немного картинок:
https://cloud.mail.ru/public/CKWf/5eTBBUv2k
https://cloud.mail.ru/public/5SpF/FKdr934rx
https://cloud.mail.ru/public/7YtC/TPkcB98kP
https://cloud.mail.ru/public/ENkd/BK6Bp3chz
Помогите пожалуйста разобраться с настройкой openvpn. Изначально я всё сделал вот по этой инструкции https://blog.itspec.ua/2019/01/16/nastr ... nnye-seti/
Pfsense выступает в качестве сервера, microtic в качестве клиента. Само соединение openvpn работает, но пинги между компьютерами обоих филиалов не идут. Пинг идёт только с микротика, если выбрать созданный интерфейс openvpn. Я предполагаю, что какой-то маршрут надо прописать, но я в микротике совсем новичок, поэтому даже не знаю куда копать.
Вот немного картинок:
https://cloud.mail.ru/public/CKWf/5eTBBUv2k
https://cloud.mail.ru/public/5SpF/FKdr934rx
https://cloud.mail.ru/public/7YtC/TPkcB98kP
https://cloud.mail.ru/public/ENkd/BK6Bp3chz
[admin@MikroTik] > /export hide-sensitive
# aug/15/2019 01:40:42 by RouterOS 6.45.3
# software id = MEMH-FLE8
#
# model = RB952Ui-5ac2nD
# serial number = 924909AF****
/interface bridge
add admin-mac=B8:69:F4:**:**:** auto-mac=no comment=defconf name=bridge
/interface ethernet
set [ find default-name=ether1 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether2 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full name=\
ether2-master
set [ find default-name=ether3 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether4 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether5 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce country=russia3 disabled=no distance=\
indoors frequency=auto mode=ap-bridge ssid=*** wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-Ceee country=russia3 disabled=no \
distance=indoors frequency=auto mode=ap-bridge ssid=*** wireless-protocol=802.11
/interface ovpn-client
add certificate=client_cert.crt_0 cipher=aes256 connect-to=xx.xx.xx.xx mac-address=02:02:E5:**:**:** name=\
ovpn_*** port=1195 user=any
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add exclude=dynamic name=discover
add name=mactel
add name=mac-winbox
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=dynamic-keys supplicant-identity=MikroTik
add authentication-types=wpa-psk,wpa2-psk mode=dynamic-keys name=profile supplicant-identity=MikroTik
/interface wireless
add disabled=no mac-address=BA:69:F4:**:**:** master-interface=wlan2 name=wlan3 security-profile=profile ssid=\
***
add disabled=no mac-address=BA:69:F4:**:**:** master-interface=wlan1 name=wlan4 security-profile=profile ssid=\
***
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp ranges=192.168.3.10-192.168.3.90
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=defconf
/interface bridge filter
add action=drop chain=forward in-interface=wlan3
add action=drop chain=forward out-interface=wlan3
add action=drop chain=forward in-interface=wlan4
add action=drop chain=forward out-interface=wlan4
/interface bridge port
add bridge=bridge comment=defconf interface=ether2-master
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge interface=ether3
add bridge=bridge interface=ether4
add bridge=bridge interface=ether5
add bridge=bridge interface=wlan3
add bridge=bridge interface=wlan4
/ip neighbor discovery-settings
set discover-interface-list=discover
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=wlan1 list=discover
add interface=wlan2 list=discover
add interface=ether2-master list=discover
add interface=ether3 list=discover
add interface=ether4 list=discover
add interface=ether5 list=discover
add interface=bridge list=discover
add interface=bridge list=mactel
add interface=bridge list=mac-winbox
/ip address
add address=192.168.3.100/24 comment=defconf interface=ether2-master network=192.168.3.0
add address=xx.xx.xx.xx/26 interface=ether1 network=xx.xx.xx.xx
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid interface=ether1
/ip dhcp-server network
add address=192.168.3.0/24 comment=defconf gateway=192.168.3.100 netmask=24
/ip dns
set allow-remote-requests=yes servers=xx.xx.xx.xx,xx.xx.xx.xx
/ip dns static
add address=192.168.3.100 name=router.lan
/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
/ip route
add distance=1 gateway=xx.xx.xx.xx
/system clock
set time-zone-name=Asia/Krasnoyarsk
/tool mac-server
set allowed-interface-list=mactel
/tool mac-server mac-winbox
set allowed-interface-list=mac-winbox
# aug/15/2019 01:40:42 by RouterOS 6.45.3
# software id = MEMH-FLE8
#
# model = RB952Ui-5ac2nD
# serial number = 924909AF****
/interface bridge
add admin-mac=B8:69:F4:**:**:** auto-mac=no comment=defconf name=bridge
/interface ethernet
set [ find default-name=ether1 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether2 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full name=\
ether2-master
set [ find default-name=ether3 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether4 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether5 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce country=russia3 disabled=no distance=\
indoors frequency=auto mode=ap-bridge ssid=*** wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-Ceee country=russia3 disabled=no \
distance=indoors frequency=auto mode=ap-bridge ssid=*** wireless-protocol=802.11
/interface ovpn-client
add certificate=client_cert.crt_0 cipher=aes256 connect-to=xx.xx.xx.xx mac-address=02:02:E5:**:**:** name=\
ovpn_*** port=1195 user=any
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add exclude=dynamic name=discover
add name=mactel
add name=mac-winbox
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=dynamic-keys supplicant-identity=MikroTik
add authentication-types=wpa-psk,wpa2-psk mode=dynamic-keys name=profile supplicant-identity=MikroTik
/interface wireless
add disabled=no mac-address=BA:69:F4:**:**:** master-interface=wlan2 name=wlan3 security-profile=profile ssid=\
***
add disabled=no mac-address=BA:69:F4:**:**:** master-interface=wlan1 name=wlan4 security-profile=profile ssid=\
***
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp ranges=192.168.3.10-192.168.3.90
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=defconf
/interface bridge filter
add action=drop chain=forward in-interface=wlan3
add action=drop chain=forward out-interface=wlan3
add action=drop chain=forward in-interface=wlan4
add action=drop chain=forward out-interface=wlan4
/interface bridge port
add bridge=bridge comment=defconf interface=ether2-master
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge interface=ether3
add bridge=bridge interface=ether4
add bridge=bridge interface=ether5
add bridge=bridge interface=wlan3
add bridge=bridge interface=wlan4
/ip neighbor discovery-settings
set discover-interface-list=discover
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=wlan1 list=discover
add interface=wlan2 list=discover
add interface=ether2-master list=discover
add interface=ether3 list=discover
add interface=ether4 list=discover
add interface=ether5 list=discover
add interface=bridge list=discover
add interface=bridge list=mactel
add interface=bridge list=mac-winbox
/ip address
add address=192.168.3.100/24 comment=defconf interface=ether2-master network=192.168.3.0
add address=xx.xx.xx.xx/26 interface=ether1 network=xx.xx.xx.xx
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid interface=ether1
/ip dhcp-server network
add address=192.168.3.0/24 comment=defconf gateway=192.168.3.100 netmask=24
/ip dns
set allow-remote-requests=yes servers=xx.xx.xx.xx,xx.xx.xx.xx
/ip dns static
add address=192.168.3.100 name=router.lan
/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
/ip route
add distance=1 gateway=xx.xx.xx.xx
/system clock
set time-zone-name=Asia/Krasnoyarsk
/tool mac-server
set allowed-interface-list=mactel
/tool mac-server mac-winbox
set allowed-interface-list=mac-winbox