OK, issue resolved.
In https://support.checkpoint.com/results/sk/sk78180 After step 6 there is an extra step. I forgot to do that.
My code to fix the issue (I need to run it most times I patch these FWs)
(All in expert mode)
The commands below do these actions:
- Checks current status
- Backs up file
- Makes the edit
- Checks status again & checks the difference between backup and edited file
more $FWDIR/conf/trac_client_1.ttm | grep ":automatic_mep_topology (" -A 9
cp $FWDIR/conf/trac_client_1.ttm $FWDIR/conf/trac_client_1.ttm_ORIGINAL
(The next bit was written by AI, my bash is not good enough, but it does work)
Turn MEP off
awk '
/:automatic_mep_topology[[:space:]]*\(/ { inblock=1 }
inblock {
gsub(/:default \(true\)/, ":default (false)")
gsub(/:client_decide \(client_decide\)/, ":client_decide (false)")
}
/^\)/ && inblock { inblock=0 }
{ print }
' $FWDIR/conf/trac_client_1.ttm > /tmp/trac_client_1.ttm.new && \
mv /tmp/trac_client_1.ttm.new $FWDIR/conf/trac_client_1.ttm
Set Correct IPs (Run only one copy of the script for each location)
# London
awk '
/:ips_of_gws_in_mep[[:space:]]*\(/ { in_ips=1 }
in_ips && /:default[[:space:]]*\(/ {
print " :default (1.2.1.1.2.1.2.2.1.3&#)"
in_ips=0
next
}
{ print }
' $FWDIR/conf/trac_client_1.ttm > /tmp/trac_client_1.ttm.new && \
mv /tmp/trac_client_1.ttm.new $FWDIR/conf/trac_client_1.ttm
# New York
awk '
/:ips_of_gws_in_mep[[:space:]]*\(/ { in_ips=1 }
in_ips && /:default[[:space:]]*\(/ {
print " :default (1.2.2.1.2.2.2.2.2.3&#)"
in_ips=0
next
}
{ print }
' $FWDIR/conf/trac_client_1.ttm > /tmp/trac_client_1.ttm.new && \
mv /tmp/trac_client_1.ttm.new $FWDIR/conf/trac_client_1.ttm
Check Results
grep -A9 ':automatic_mep_topology (' $FWDIR/conf/trac_client_1.ttm
grep -A5 ':ips_of_gws_in_mep (' $FWDIR/conf/trac_client_1.ttm
diff $FWDIR/conf/trac_client_1.ttm $FWDIR/conf/trac_client_1.ttm_ORIGINAL
This shows the difference between the backup and the new file, plus shows the area there the files are changed.
This allows you to run through the process without manually modifying the file each time. Really useful if you have to do this every time you do a major patch.
Hopefully it helps someone else.