Доступ к внутренним ресурсам сети

Обсуждение ПО и его настройки
Ответить
cheburah
Сообщения: 14
Зарегистрирован: 07 сен 2020, 11:12

Здравствуйте.
Прошу помощи, в роутер заходят два провайдера, первый дает адрес по DHCP, у него же я покупаю публичный IP, второй дает статику, я у него сижу за NATом с серым IP. Настроена балансировка ECMP, великолепно работает, скорости складываются, задержек нет вообще. Настроен доступ по VPN, тоже великолепно работает, все ресурсы внутренней сети я вижу, все быстро. Настроен доступ по https к компу во внутренней сети. И здесь все плохо, очень медленно. Но стоит отключить интерфейс со вторым провайдером с серым IP, все становится великолепно.
 конфигурация
/interface bridge
add admin-mac=xxx arp=proxy-arp auto-mac=no comment=defconf \
name=bridge
/interface ovpn-client
add certificate=client.crt_0 cipher=aes256 connect-to=xxx \
mac-address=xxx name=google user=client
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=WAN1
/ip ipsec profile
set [ find default=yes ] dh-group=ecp256,ecp384,modp2048,modp1024 \
enc-algorithm=aes-256,3des
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha256,sha1
/ip pool
add name=vpn ranges=192.168.14.170-192.168.14.180
/ppp profile
set *FFFFFFFE local-address=192.168.14.250 remote-address=vpn use-encryption=\
required
/interface bridge port
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=sfp1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface l2tp-server server
set authentication=mschap2 enabled=yes ipsec-secret=xxx use-ipsec=yes
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=ether2 list=WAN1
/ip address
add address=192.168.14.100/24 comment=defconf interface=bridge network=\
192.168.14.0
add address=10.10.xx.xx/24 interface=ether2 network=10.10.xx.0
/ip dhcp-client
add add-default-route=no comment=defconf disabled=no interface=ether1 \
use-peer-dns=no use-peer-ntp=no
/ip dns
set allow-remote-requests=yes servers=176.103.130.130,176.103.130.131
/ip firewall address-list
add address=nnmclub.to list=unblock
add address=check.torproject.org list=unblock
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=accept chain=input dst-address=188.yy.yy.yy dst-port=1701,500,4500 \
in-interface=ether1 protocol=udp
add action=accept chain=input in-interface=ether1 protocol=ipsec-esp
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=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
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 mangle
add action=mark-routing chain=prerouting dst-address-list=unblock \
new-routing-mark=rkn passthrough=no src-address=192.168.14.0/24
add action=mark-connection chain=forward in-interface=ether1 \
new-connection-mark=cin_ISP1 passthrough=yes
add action=mark-connection chain=forward in-interface=ether2 \
new-connection-mark=cin_ISP2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=cin_ISP1 \
new-routing-mark=rout_ISP1 passthrough=yes src-address=192.168.14.0/24
add action=mark-routing chain=prerouting connection-mark=cin_ISP2 \
new-routing-mark=rout_ISP2 passthrough=yes src-address=192.168.14.0/24
add action=mark-connection chain=input dst-address=188.yy.yy.yy in-interface=\
ether1 new-connection-mark=wan1-input passthrough=yes
add action=mark-connection chain=input dst-address=10.10.xx.xx in-interface=\
ether2 new-connection-mark=wan2-input passthrough=yes
add action=mark-routing chain=output connection-mark=wan1-input \
new-routing-mark=rout_ISP1 passthrough=yes
add action=mark-routing chain=output connection-mark=wan2-input \
new-routing-mark=rout_ISP2 passthrough=yes
add action=mark-connection chain=output new-connection-mark=wan1-out \
passthrough=yes src-address=188.yy.yy.yy
add action=mark-connection chain=output new-connection-mark=wan2-out \
passthrough=yes src-address=10.10.xx.xx
add action=mark-routing chain=output connection-mark=wan1-out \
new-routing-mark=rout_ISP1 passthrough=yes src-address=188.yy.yy.yy
add action=mark-routing chain=output connection-mark=wan2-out \
new-routing-mark=rout_ISP2 passthrough=yes src-address=10.10.xx.xx
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1 src-address=\
192.168.14.0/24
add action=src-nat chain=srcnat out-interface=ether2 src-address=\
192.168.14.0/24 to-addresses=10.10.xx.xx
add action=masquerade chain=srcnat out-interface=google
add action=dst-nat chain=dstnat dst-address=188.yy.yy.yy dst-port=443 \
protocol=tcp to-addresses=192.168.14.47 to-ports=443
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
set pptp disabled=yes
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes
/ip route
add check-gateway=ping distance=1 gateway=188.yy.yy.1 routing-mark=rout_ISP1
add check-gateway=ping distance=1 gateway=10.10.xx.1 routing-mark=rout_ISP2
add distance=1 gateway=google routing-mark=rkn
add distance=1 gateway=188.yy.yy.1,10.10.xx.1
/ip service
set telnet address=192.168.14.0/24
set ftp address=192.168.14.0/24
set www disabled=yes
set ssh address=192.168.14.0/24
set api address=192.168.14.0/24
set winbox address=192.168.14.0/24
set api-ssl address=192.168.14.0/24
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=ether1 type=external
add interface=ether2 type=external
/ppp secret
add name=vpn password=zzz profile=default-encryption
/system clock
set time-zone-name=Europe/Moscow
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN


xvo
Сообщения: 4204
Зарегистрирован: 25 фев 2018, 22:41
Откуда: Москва

Fasttrack отключайте.


Telegram: @thexvo
cheburah
Сообщения: 14
Зарегистрирован: 07 сен 2020, 11:12

Благодарю, помогло


xvo
Сообщения: 4204
Зарегистрирован: 25 фев 2018, 22:41
Откуда: Москва

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


Telegram: @thexvo
Ответить