tec Posted May 24, 2016 Задача оч. простая пробросить RDP на RB750r2 hex lite. Простейший домашний роутер делает это на раз два. Куча статей в инете как это сделать. Грабли в том что хост спрашивает авторизацию на RDP, но после ввода корректного (проверенного) пароля не удается подключиться. Когда то была такая же проблема при пробросе на Debian и отказом от подходящего пароля. Лечил сменой стандартного 3389 на другой, но тут так не помогает. Такое впечатление что не идет исходящий трафик. Настройки на скринах. Правило ната выше маскарадинга. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
AciDSAS Posted May 25, 2016 Покажите /ip firewall exportОчень мало информации в двух скриншотах. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tec Posted May 26, 2016 (edited) [admin@MikroTik] > /ip firewall export # may/26/2016 10:39:10 by RouterOS 6.30.4 # software id = SMY9-CNBL # /ip firewall filter add chain=input comment="default configuration" protocol=icmp add chain=input comment="default configuration" connection-state=established add chain=input comment="default configuration" connection-state=related add chain=input comment="allow l2tp" dst-port=1701 protocol=udp add chain=input comment="allow pptp" dst-port=1723 protocol=tcp add chain=input comment="allow sstp" dst-port=443 protocol=tcp add chain=forward connection-state=established,related add action=drop chain=input comment="default configuration" in-interface=\ ether1-uplink /ip firewall nat add action=dst-nat chain=dstnat dst-port=3389 in-interface=pppoe-uplink \ protocol=tcp to-addresses=172.17.41.100 to-ports=3389 add action=masquerade chain=srcnat out-interface=pppoe-uplink src-address=\ 192.168.0.0/19 add action=masquerade chain=srcnat dst-port=53 out-interface=pppoe-uplink \ protocol=udp src-address=192.168.99.0/24 add action=masquerade chain=srcnat dst-address=192.168.200.1 out-interface=\ pptp-4805.no-ip.org protocol=tcp src-address=192.168.0.0/16 add action=redirect chain=dstnat dst-port=80 protocol=tcp src-address=\ 192.168.99.0/24 to-ports=8080 add action=redirect chain=dstnat dst-port=443 protocol=tcp src-address=\ 192.168.99.0/24 to-ports=8080 99 подсеть используется как заглушка для клиентов у которых закончился тариф Edited May 26, 2016 by tec Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
DRiVen Posted May 26, 2016 add action=dst-nat chain=dstnat dst-port=3389 in-interface=pppoe-uplink \ protocol=tcp to-addresses=172.17.41.100 to-ports=3389 А где маскарадинг для 172.17.41.100? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tec Posted May 26, 2016 (edited) А разве он нужен, у меня на debian без него работает Особенность микротик? Edited May 26, 2016 by tec Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
DRiVen Posted May 26, 2016 Нет, особенность NAT. add action=masquerade chain=srcnat out-interface=pppoe-uplink src-address=172.17.41.100/32 Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tec Posted May 27, 2016 Спасибо за ответ. Похоже хост с RDP сейчас в отключке проверить нет возможности. Позже отпишусь Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tec Posted May 28, 2016 (edited) Добрался, ноут с RDP почему-то ушел в спячку. Прописал в хосте шлюз смотрящий на микротик. RDP запахал. Только запустил на нём инет - RDP отвалилось, что вроде бы логично. Вопрос как сделать чтобы работал RDP без указания шлюза. Тк задача - лазить на этот хост в реальных условиях проверять качество инета на разных тарифах. В debian я пользуюсь вот таким питоновским скриптиком #!/usr/bin/python from sys import argv from subprocess import call script = argv[0] if len(argv) != 5: print "Usage: %s action local_port remote_ip remote_port" % script print "Example: %s add 1234 172.17.40.100 3389" % script print "Example: %s del 8000 172.17.70.1 80" % script exit() if argv[1] == "add": argv[1] = "-A" elif argv[1] == "del" or argv[1] == "delete": argv[1] = "-D" else: print "Wrong action. Valid actions: 'add', 'del'" rule1 = 'iptables -t nat %s PREROUTING -p tcp --dport %s -j DNAT --to-destination %s:%s' % (argv[1], argv[2], argv[3], argv[4]) rule2 = 'iptables -t nat %s POSTROUTING -p tcp --dport %s -j MASQUERADE' % (argv[1], argv[4]) call(rule1.split()) call(rule2.split()) Вызов /etc/scripts/./pf.py add 3389 172.17.41.100 3389 Edited May 28, 2016 by tec Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
DRiVen Posted May 29, 2016 Вопрос как сделать чтобы работал RDP без указания шлюза. add action=src-nat chain=srcnat dst-address=172.17.41.100 dst-port=3389 protocol=tcp to-addresses=[адрес на интерфейсе МТ из 172 сети] Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tec Posted May 30, 2016 (edited) Разобрался, оказывается проблема была в том что на серваке, за натом которого я сижу, тоже был проброшен 3389. Я уходил на 3390, и этот порт тоже оказался занятым. Ушёл на 1235 и всё заработало. Я вводил пароль RDP и естественно он не подходил тк меня заворачивало хз на чей хост. Спасибо за правила. Edited May 30, 2016 by tec Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...