diablo-ad Posted March 20, 2017 (edited) Mikrotik несколько WAN: как обеспечить доступность по всем входам проброшенного порта dst-nat? Возникла проблема с настройкой нескольких подключений от провайдеров на miokrotik. Нет доступности к ресурсам за NAT. Где ошибка в mangle? Вроде заданы и маркеры на входящие пакеты, и соответствующие маршруты для них. Сам mikrotik с обоих внешних IP доступен. А вот проброс порта до веб-сервера внутри сети не дает ответа конфиг: # mar/20/2017 07:10:20 by RouterOS 6.38.5 /interface bridge add name=localnet /interface ethernet set [ find default-name=ether3 ] comment="ISP1" set [ find default-name=ether4 ] comment="ISP2" /interface list add name=WAN /interface bridge port add bridge=localnet interface=ether5 add bridge=localnet interface=ether6 add bridge=localnet interface=ether7 add bridge=localnet interface=ether8 /interface list member add interface=ether3 list=WAN add interface=ether4 list=WAN /ip address add address=192.168.2.253/24 interface=localnet network=192.168.2.0 add address=1.1.1.1/30 interface=ether4 network=1.1.1.0 add address=1.2.2.1/30 interface=ether3 network=1.2.2.0 /ip firewall filter add action=accept chain=input dst-port=8291 protocol=tcp add action=accept chain=forward add action=accept chain=output add action=accept chain=input /ip firewall mangle add action=mark-connection chain=input in-interface=ether3 \ new-connection-mark=ISP1-conn passthrough=yes add action=mark-connection chain=input in-interface=ether4 \ new-connection-mark=ISP2-conn passthrough=yes add action=mark-routing chain=output connection-mark=ISP1-conn \ new-routing-mark=ISP1-route passthrough=no add action=mark-routing chain=prerouting connection-mark=ISP1-f \ in-interface-list=!WAN new-routing-mark=ISP1-route passthrough=no add action=mark-connection chain=prerouting in-interface=ether3 \ new-connection-mark=ISP1-f passthrough=no add action=mark-connection chain=prerouting in-interface=ether4 \ new-connection-mark=ISP2-f passthrough=no add action=mark-routing chain=prerouting connection-mark=ISP2-f \ in-interface-list=!WAN new-routing-mark=ISP2-route passthrough=no add action=mark-connection chain=forward in-interface=ether3 \ new-connection-mark=ISP1-f passthrough=no add action=mark-connection chain=forward in-interface=ether4 \ new-connection-mark=ISP2-f passthrough=no add action=mark-routing chain=output connection-mark=ISP2-conn \ new-routing-mark=ISP2-route passthrough=no /ip firewall nat add action=masquerade chain=srcnat out-interface-list=WAN #проброс до веб сервера add action=jump chain=dstnat dst-address=1.1.1.1 jump-target=\ port-forward add action=jump chain=dstnat dst-address=1.2.2.1 jump-target=\ port-forward add action=dst-nat chain=port-forward dst-port=10080 protocol=tcp \ to-addresses=192.168.2.2 to-ports=80 /ip route #маршруты маркированные add distance=1 gateway=1.1.1.2 routing-mark=ISP1-route add distance=1 gateway=1.2.2.2 routing-mark=ISP2-route #стандартные маршруты add distance=1 gateway=1.1.1.2 add distance=2 gateway=1.2.2.2 в чем ошибка? Edited March 20, 2017 by diablo-ad Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
nkusnetsov Posted March 20, 2017 (edited) diablo-ad, для chain=output используйте также критерий src-address. Типа такого: /ip firewall mangle add action=mark-routing chain=output src-address=1.1.1.1 new-routing-mark=ISP1-route passthrough=no /ip firewall mangle add action=mark-routing chain=output src-address=1.2.2.1 new-routing-mark=ISP2-route passthrough=no В результате исходящие (в т.ч. ответные до установки соединения) пакеты с каждого src-IP пойдут строго через свой интерфейс. Edited March 20, 2017 by nkusnetsov Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
diablo-ad Posted March 20, 2017 diablo-ad, для chain=output используйте также критерий src-address. Типа такого: /ip firewall mangle add action=mark-routing chain=output src-address=1.1.1.1 new-routing-mark=ISP1-route passthrough=no /ip firewall mangle add action=mark-routing chain=output src-address=1.2.2.1 new-routing-mark=ISP2-route passthrough=no В результате исходящие (в т.ч. ответные до установки соединения) пакеты с каждого src-IP пойдут строго через свой интерфейс. добавил src-adr...но ничего не меняется, сам роутер доступен по обоим адресам, но dstnat до узла за ним нет Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
EugeneTV Posted March 21, 2017 https://habrahabr.ru/post/313342/ Полно же мануалов в сети Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
KoMoEcTaC Posted April 2, 2017 (edited) В этих мануалах вообще не разобраться бывает((( https://www.mylomann.com Edited April 2, 2017 by KoMoEcTaC Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
EugeneTV Posted April 3, 2017 В этих мануалах вообще не разобраться бывает Дык эта: Орешек знаний тверд,Но все же мы не привыкли отступать Нам расколоть его поможет киножурнал "Хочу все знать" Читайте, разбирайтесь. Все когда-то прошли по граблям. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
KoMoEcTaC Posted October 13, 2017 (edited) Это точно! http://wwwmylomann.com Edited October 13, 2017 by KoMoEcTaC Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...