satanasoff Posted July 1, 2018 Report Share Posted July 1, 2018 Здравейте, От скоро съм ползвател на рутер RBD52G и срещнах трудност да настоя връзка през рутера до Линукс сървър с open SSH на порт 22. Мисля, че не съм задал коректно настройките в firewall/NAT. Настройките които зададох са: 2 правило: General: chain: srcnat src. address: 192.168.88.246 protocol: 6 (tcp) src. port: 22 out interface: ether1 Action: src-nat to address: real static IP address to ports: 22 1 правило: General: chain: dstnat dst. address: real static IP address protocol: 6 (tcp) dst. port: 22 in.interface: ether1 Action: dst-nat to address: 192.168.88.246 to ports: 22 0 правило: General chain: srcnat out interface list: WAN Action: masquerade Опитвам се да достъпя сървъра с PuTTY и Core FTP. В IP Service List порт ssh 22 е оцветен в зелено. Вътрешния IP: 192.168.88.246 адрес съм го задал като статичен. Бихте ли казали какво да коригирам. Благодаря на всички за предложенията. Link to comment Share on other sites More sharing options...
Administrator 111111 Posted July 1, 2018 Administrator Report Share Posted July 1, 2018 Дай един експорт на NAT правилата ip firewall nat export понеже по обясненията ти си го направил наопаки Харесай поста ^^^ Форумът е за взаимопомощ а не за свършване на чужда работа ɹɐǝɥ uɐɔ noʎ ǝɹoɯ ǝɥʇ 'ǝɯoɔǝq noʎ ɹǝʇǝınb ǝɥʇ Link to comment Share on other sites More sharing options...
satanasoff Posted July 1, 2018 Author Report Share Posted July 1, 2018 Здравей, ето го и експорта: /ip firewall nat add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-pol out,none out-interface-list=WAN add action=dst-nat chain=dstnat dst-address=77.00.00.000 dst-port=22 \ in-interface=ether1 protocol=tcp to-addresses=192.168.88.246 to-ports= add action=src-nat chain=srcnat out-interface=ether1 protocol=tcp src-addr 192.168.88.246 src-port=22 to-addresses=77.00.00.000 to-ports=22 Link to comment Share on other sites More sharing options...
Administrator 111111 Posted July 2, 2018 Administrator Report Share Posted July 2, 2018 Вътрешното и външното ип са наопаки. Проследи си логиката на правилото. Ако ти е пуснат SSH сървъра на микротик-а може да имаш конфликт. Харесай поста ^^^ Форумът е за взаимопомощ а не за свършване на чужда работа ɹɐǝɥ uɐɔ noʎ ǝɹoɯ ǝɥʇ 'ǝɯoɔǝq noʎ ɹǝʇǝınb ǝɥʇ Link to comment Share on other sites More sharing options...
satanasoff Posted July 2, 2018 Author Report Share Posted July 2, 2018 Благодаря. Ще ги оправя и ще пробвам. Link to comment Share on other sites More sharing options...
satanasoff Posted July 2, 2018 Author Report Share Posted July 2, 2018 Прочетох, че SSH сървъра работи след инсталацията на Микротика. Как мога да го спра, за да нямам конфликт? Link to comment Share on other sites More sharing options...
satanasoff Posted July 2, 2018 Author Report Share Posted July 2, 2018 Здравей, размених IP -тата и на двете вериги, но не се получи. Това са редактираните правила: /ip firewall nat add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN add action=dst-nat chain=dstnat dst-address=192.168.88.246 dst-port=22 in-interface=ether1 protocol=tcp to-addresses=77.00.00.000 to-ports=22 add action=src-nat chain=srcnat dst-port="" out-interface=ether1 protocol=tcp src-address=77.00.00.000 src-port=22 to-addresses=192.168.88.246 to-ports=22 Link to comment Share on other sites More sharing options...
Administrator 111111 Posted July 2, 2018 Administrator Report Share Posted July 2, 2018 Първото правило за нат ОК Второто никога няма да проработи никога, не знам каква ти е логиката с него. Третото правило също е някаква енигма. Има елементарна логика която явно ти убягва Цитат На интерфейс WAN, при заявка на порт 22, да се прехвърли заявката на вътрешен адрес с порт Опиши логиката на твоите правила, и виж разликата. Харесай поста ^^^ Форумът е за взаимопомощ а не за свършване на чужда работа ɹɐǝɥ uɐɔ noʎ ǝɹoɯ ǝɥʇ 'ǝɯoɔǝq noʎ ɹǝʇǝınb ǝɥʇ Link to comment Share on other sites More sharing options...
satanasoff Posted July 3, 2018 Author Report Share Posted July 3, 2018 Здравей, благодаря за отговора. Ще изтрия второто и третото правило. Би ли казал, как мога да направя това правило: На интерфейс WAN, при заявка на порт 22, да се прехвърли заявката на вътрешен адрес с порт . Моята идея е да редактирам първото правило, като в Action добавя на ip адрес: 192.168.88.246 и на порт: 22. Link to comment Share on other sites More sharing options...
Щирлиц Posted July 3, 2018 Report Share Posted July 3, 2018 https://wiki.mikrotik.com/wiki/Talk:Forwarding_a_port_to_an_internal_IP Link to comment Share on other sites More sharing options...
satanasoff Posted July 3, 2018 Author Report Share Posted July 3, 2018 Благодаря за информацията. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now