вторник, 24 марта 2015 г.

IP Redundancy в Checkpoint SPLAT R75.40VS

Понадобилось двух ОПСов подключить в режиме балансировки нагрузки, без BGP :)

Все предыдущие попытки это нормально сделать на роутерах cisco были костыльными. Подумали "а чем черт не шутит" и решили испытать.

Подготовка:
изучена официальная дока и пролистан бог Дениса Урасова спасибо! 
Но в отличии от Дениса, у нас трафик исходящий, т.е. просто использования Интернет'а пользователями из локалки.

Не буду сюда приводить картинки из GUI, так как оф.доки или записей Дениса хватит заглаза.

Единственное, что в нашем случае не заработало, это Hide manual Nat из локалки.

Но поиски по оф.сайту дали решение, для тех у кого нет доступа повторяю текст сюда.

Описательная часть, надо создать динамические объекты(IP адреса для Nat'ирования) и изменять их скриптами. перевод не привожу так как в оригинале всё понятно.

In SmartDashboard, define two Manual NAT rules for outgoing connections (a rule for each ISP link) - use the objects 'DYN_ISP_A' and 'DYN_ISP_B'.

Note: Order of incoming and outgoing connections is important. Placing outgoing rules before incoming rules may impair Security Server functionality.

Пример правил Nat'а


где: 

DYN_ISP_A - это у нас Primary
DYN_ISP_B -  это - Backup

host объекты l_
Primary и  l_Backup - белые адреса от провайдеров.

On the Security Gateway / each member of ClusterXL, run 'cpstop' command. 
To complete the definition of Dynamic Objects, it is necessary to run the following commands on the Security Gateway / each member of ClusterXL:

Note: "DYN_ISP_A" and "DYN_ISP_B" are the names of the objects that represent the first ISP and second ISP, respectively. When running the commands below, you have to use the exact object name from SmartDashboard (case-sensitive).


[Expert@HostName]# dynamic_objects -n DYN_ISP_A
[Expert@HostName]# dynamic_objects -n DYN_ISP_B
[Expert@HostName]# dynamic_objects -o DYN_ISP_A -r 0.0.0.0 0.0.0.0 -a
[Expert@HostName]# dynamic_objects -o DYN_ISP_B -r 0.0.0.0 0.0.0.0 -a

Note: To see the correct usage and syntax, just run 'dynamic_objects' command. 

On the Security Gateway / each member of ClusterXL, edit the $FWDIR/bin/cpisp_update script, and add the following lines at the end of the script - before the "exit" line:

Note: "DYN_ISP_A" and "DYN_ISP_B" are the names of the objects that represent the first ISP and second ISP, respectively. When running the commands below, you have to use the exact object name from SmartDashboard (case-sensitive).

# Verify which link is up with this command: tail -f /tmp/cpisp_state
echo "--------------------------" >> /tmp/cpisp_state
echo `/bin/date +%d-%b-%Y_%Hh-%Mm-%Ss` >> /tmp/cpisp_state
echo "RESTARTING SCRIPT" >> /tmp/cpisp_state
echo "LINK1" >> /tmp/cpisp_state
echo $LINK1_STATE >> /tmp/cpisp_state
echo "LINK2" >> /tmp/cpisp_state
echo $LINK2_STATE >> /tmp/cpisp_state
echo "--------------------------" >> /tmp/cpisp_state
echo " " >> /tmp/cpisp_state

# Check if the Link is up or down

if ($LINK2_STATE == "down") then
fw tab -t dynobj_cache -x -y
dynamic_objects -o DYN_ISP_A -r 0.0.0.0 255.255.255.255 -a
dynamic_objects -o DYN_ISP_B -r 0.0.0.0 255.255.255.255 -d
dynamic_objects -o DYN_ISP_B -r 0.0.0.0 0.0.0.0 -a 
endif

if ($LINK1_STATE == "down") then

fw tab -t dynobj_cache -x -y
dynamic_objects -o DYN_ISP_B -r 0.0.0.0 255.255.255.255 -a
dynamic_objects -o DYN_ISP_A -r 0.0.0.0 255.255.255.255 -d
dynamic_objects -o DYN_ISP_A -r 0.0.0.0 0.0.0.0 -a 
endif

# if both Links are up, return to Load Sharing

if (($LINK1_STATE == "up") && ($LINK2_STATE == "up")) then
fw tab -t dynobj_cache -x -y
dynamic_objects -o DYN_ISP_A -r 0.0.0.0 255.255.255.255 -a
dynamic_objects -o DYN_ISP_B -r 0.0.0.0 255.255.255.255 -a
endif

On the Security Gateway / each member of ClusterXL, run 'cpstart' command. 


In SmartDashboard, install the Security Policy onto Security Gateway/ClusterXL.

!!! Необходимо обратить внимание:
Before upgrading this Security Gateway / Cluster, back up the modified $FWDIR/bin/cpisp_update script because during the upgrade, it will be overwritten by the default script.
After upgrading, replace the default script with your the modified script.





Комментариев нет:

Отправить комментарий