kriks Posted November 18, 2011 Posted November 18, 2011 Кто имел дело с такой железкой, помогите реализовать такую схему. Вставить ник Quote
msdt Posted November 21, 2011 Posted November 21, 2011 (edited) Если на фаерволе нормально расставлены зоны (по умолчанию вроде untrust - наружу, trust - внутрь), то последовательность команд для создания проброса снаружи внутрь должна быть примерно следующая: set security nat destination pool server_dst_nat_pool address 192.168.0.1/32 set security nat destination rule-set dst-nat-01 rule server_dst_nat_rule match source-address 0.0.0.0/0 set security nat destination rule-set dst-nat-01 rule server_dst_nat_rule match destination-address 10.0.0.1/32 set security nat destination rule-set dst-nat-01 rule server_dst_nat_rule match destination-port 80 set security nat destination rule-set dst-nat-01 rule server_dst_nat_rule then destination-nat pool server_dst_nat_pool set security zones security-zone trust address-book address 192.168.0.1/32 192.168.0.1/32 set security policies from-zone untrust to-zone trust policy untrust_to_trust_server match source-address any set security policies from-zone untrust to-zone trust policy untrust_to_trust_server match destination-address 192.168.0.1/32 set security policies from-zone untrust to-zone trust policy untrust_to_trust_server match application junos-http set security policies from-zone untrust to-zone trust policy untrust_to_trust_server then permit Все делается в консоли, предварительно нужно сказать configure, а в завершение - commit. Ну и вебадминка роутера после этого станет недоступна на внешнем интерфейсе. Edited November 21, 2011 by msdt Вставить ник Quote
kriks Posted December 4, 2011 Author Posted December 4, 2011 Сделал как вы подсказали: Результат команды commit krik@junos.gw.bee-media.org# commit [edit security nat destination] 'rule-set dst-nat' Missing mandatory statement: 'from' error: commit failed: (missing statements) [edit] krik@junos.gw.bee-media.org# --- JUNOS 10.4R3.4 built 2011-03-19 22:29:40 UTC krik@junos.gw.bee-media.org# edit security nat destination [edit security nat destination] krik@junos.gw.bee-media.org# show pool server_dst_nat_pool { address 192.168.100.2/32; } rule-set dst-nat { rule server_dst_nat_rule { match { source-address 0.0.0.0/0; destination-address 10.61.128.16/32; destination-port 22; } then { destination-nat pool server_dst_nat_pool; } } ## Warning: missing mandatory statement(s): 'from' } [edit security nat destination] krik@junos.gw.bee-media.org# interfaces { fe-0/0/0 { description For_operator; unit 0 { family inet { address 10.61.128.16/21; } } } Я извиняюсь, ещё до конца не изучил синтаксис Junosa. Подскажите, что не так? Вставить ник Quote
kriks Posted December 4, 2011 Author Posted December 4, 2011 Спасибо, разобрался. Не хватало set security nat destination rule-set dst-nat from zone untrust Вставить ник Quote
msdt Posted December 4, 2011 Posted December 4, 2011 Спасибо, разобрался. Не хватало set security nat destination rule-set dst-nat from zone untrust Точно, упустил... Вставить ник Quote
kriks Posted December 4, 2011 Author Posted December 4, 2011 Спасибо, разобрался. Не хватало set security nat destination rule-set dst-nat from zone untrust Точно, упустил... Ещё раз спасибо. Все классно работает, теперь по такому подобию можно и другие порты пробрасывать. Возможно кому либо понадобится такой конфиг. Вставить ник Quote
Ilia.Y Posted February 21, 2013 Posted February 21, 2013 У меня всеравно не олучилось, пишет: А как пробросить 55777 туда и обратно? т.е. из траста в антраст и из антраста в трас? Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.