Pages

Thursday, January 30, 2014

Copy certificates after RE replacement in JunOS HA cluster

This KB can be used on SRX firewalls as well.

usually when you start the CRL request, installed the certs for local and CA, both cluster members will automatically synchronized for certs and keys between nodes since  PKI is supported in SRX cluster environment.

When one node lost their key and certs, following procedures can help to get them from another node.


SUMMARY:
This document explains how to copy certificates after RE replacement in HA cluster.
PROBLEM OR GOAL:
These certificates and key-pairs won't get synched from other Node when new RE is replaced.
As the certificates does not get synched, the IPSEC tunnel using certificates will go down after failover to this Node (On which RE was replaced).

The certificates/key-pairs used for IKE negotiations are stored in following locations,

/var/db/certs/common/key-pair
/var/db/certs/common/local
/var/db/certs/common/certification-authority
SOLUTION:
Procedure is as follow

1. Start shell as root user on both cluster nodes in two sessions.
2. Verify content on source cluster node of first folder with "ls -la /var/db/certs/common/key-pair/"
3. Confirm do you have same file names on destination cluster node with same command.
4. If you have files with same names in destination folder, backup them with moving to some other location.

===
root@SRX-B% pwd
/var/db/certs/common/key-pair
root@SRX-B% ls -la
total 8
drwx------ 2 root wheel 512 Jan 22 15:09 .
drwx------ 7 root wheel 512 Mar 26 2009 ..
-rw-r--r-- 1 root wheel 0 Jan 22 15:09 test
root@SRX-B% mv test test.old
root@SRX-B% ls -la
total 8
drwx------ 2 root wheel 512 Jan 22 15:10 .
drwx------ 7 root wheel 512 Mar 26 2009 ..
-rw-r--r-- 1 root wheel 0 Jan 22 15:09 test.old
root@SRX-B%
===

5. From source cluster node copy files from first folder, make sure that you use correct node number for destination:
===
root@SRX-X% rcp -T /var/db/certs/common/key-pair/* nodex:/var/db/certs/common/key-pair/
===
6. Verify on destination cluster node do you have new file copied from first node with "ls -la"
7. Repeat steps 2 to 6 for each folder

Wednesday, January 29, 2014

Juniper Hidden Command : set chassis cluster control-link-vlan enable

set chassis cluster control-link-vlan enable

Explanation:

[SRX] How to enable or disable VLAN tagging on the chassis cluster control port


SUMMARY:
This article provides information on how to enable and disable VLAN tagging on the chassis cluster control port.
PROBLEM OR GOAL:
  • One Node is upgraded from a version that is prior to or from Junos OS 10.2R2 to 10.4 or later.

  • By default, the VLAN tag on the control port will be in the enabled state.

  • The node on which RE has been replaced was downgraded/upgraded from a version after Junos OS 10.2R2 to the same version as the other node and does not join the cluster and goes into split brain; that is, the nodes do not see each other.


Sample Output on NODE-0:

{primary:node0}
root@> show chassis cluster information detail
node0:
--------------------------------------------------------------------------
Redundancy mode:
Configured mode: active-active
Operational mode: active-active

Redundancy group: 0, Threshold: 255, Monitoring failures: none
Events:
Aug 5 16:51:18.773 : hold->secondary, reason: Hold timer expired
Aug 5 16:51:34.789 : secondary->primary, reason: Only node present
Control link statistics:
Control link 0:
Heartbeat packets sent: 63115
Heartbeat packets received: 0
Heartbeat packet errors: 0
Duplicate heartbeat packets received: 0
Control recovery packet count: 0
Sequence number of last heartbeat packet sent: 63114
Sequence number of last heartbeat packet received: 0
Fabric link statistics:
Probes sent: 63114
Probes received: 0
Probe errors: 0
Probes not processed: 0
Probes dropped due to control link down: 0
Probes dropped due to fabric link down: 0
Sequence number of last probe sent: 63114
Sequence number of last probe received: 0
Chassis cluster LED information:
Current LED color: Red
Last LED change reason: Peer node: node1 is not present
Control port tagging:
Enabled



{primary:node0}
root> show chassis cluster status
Cluster ID: 1
Node Priority Status Preempt Manual failover
Redundancy group: 0,Failover count: 1
node0 1 primary no no
node1 0 lost n/a n/a

Sample Output on NODE-1:

{primary:node1}
root> show chassis cluster information detail
node1:
--------------------------------------------------------------------------
Redundancy mode:
Configured mode: active-active
Operational mode: active-active

Redundancy group: 0, Threshold: 255, Monitoring failures: none
Events:
Aug 5 16:50:52.904 : hold->secondary, reason: Hold timer expired
Aug 5 16:56:38.711 : secondary->primary, reason: Remote yield (1/0)
Control link statistics:
Control link 0:
Heartbeat packets sent: 64212
Heartbeat packets received: 337
Heartbeat packet errors: 0
Duplicate heartbeat packets received: 0
Control recovery packet count: 0
Sequence number of last heartbeat packet sent: 64210
Sequence number of last heartbeat packet received: 361
Fabric link statistics:
Probes sent: 64210
Probes received: 0
Probe errors: 0
Probes not processed: 0
Probes dropped due to control link down: 0
Probes dropped due to fabric link down: 0
Sequence number of last probe sent: 64210
Sequence number of last probe received: 0
Chassis cluster LED information:
Current LED color: Red
Last LED change reason: Peer node: node0 is not present
Control port tagging:
Disabled


{primary:node1}
root> show chassis cluster status
Cluster ID: 1
Node Priority Status Preempt Manual failover

Redundancy group: 0 , Failover count: 1
node0 0 lost n/a n/a
node1 1 primary no no



CAUSE:
One device is sending a tagged heartbeat and the other is sending a untagged heartbeat, as VLAN tagging is enabled on one node and disabled on the other node.
SOLUTION:
Prior to Junos OS 10.2R3, in the chassis cluster, VLAN tagging was enabled by default on the control port. From Junos OS 10.2R3 onwards, by default VLAN tagging is not enabled on the control port.
To check the control port tagging status, execute the show chassis cluster information detail command and look for Control port tagging:
admin@host> show chassis cluster information detail
.
Control port tagging:
Disabled
On one node, it is enabled and on the other node, it is disabled.
It is also possible to check by taking the packet capture of the control port from both of the nodes. In one node,  the packet will be tagged with vlan-id 4096 and the other packet will not have any tagging. VLAN tagging on the control port can be enabled or disabled by using the following command:
admin@host> set chassis cluster control-link-vlan enable/disable
Notecontrol-link-vlan is a hidden command on the SRX platform. Users must manually configure this command.
As VLAN tagging is disabled on the control port in versions that are later than Junos OS 10.2R2, it is recommended to disable tagging on both of the nodes.
PURPOSE:
Configuration
Implementation
Installation
Troubleshooting
RELATED LINKS: 

Procedures to Replace failed Checkpoint Cluster Member Appliance

The UTM 272 is running R75.40. We found when it failed over to active, the load will push temperature higher than 60, which caused it shutdown itself.

Called Checkpoint Support and get RMA order.

Here is the procedures to replace it:

1. Console in.

Check Point SecurePlatform R71.30
For Web User Interface access connect to https://192.168.1.1:4434

login: admin
Password: 
Last login: Thu Jan 23 00:24:59 on ttyS0

? for list of commands
sysconfig for system and products configuration

[cpmodule]# cpconfig
Welcome to Check Point Appliance

You can not use the 'sysconfig' and 'cpconfig' utilities until you successfully complete
the First Time Wizard in the Administration web GUI.

Press Enter to continue...

2. Disabling/bypassing the First Time Configuration Wizard based on sk71000

[cpmodule]# expert
Enter expert password: 

You are in expert mode now.

[Expert@cpmodule]# 
[Expert@cpmodule]# touch /opt/spwm/conf/wizard_accepted 
[Expert@cpmodule]# reboot

Are you sure? (y/n) y

INIT: Sending processes the TERM signal

3. [cpmodule]# cpconfig

Welcome to Check Point Configuration Program
=================================================
Please read the following license agreement. 
Hit 'ENTER' to continue... 

       Software License Agreement & Limited Hardware Warranty
              Check Point Software Technologies Ltd.
...

Do you accept all the terms of this license agreement (y/n) ? y


Select installation type:
-------------------------

(1) Stand Alone - install Check Point Security Gateway and Security Management.
(2) Distributed - install Check Point Security Gateway, Security Management and/or Log Server.

Enter your selection  (1-2/a-abort) [1]: 2

Select installation type:
-------------------------

(1) Check Point Security Gateway.
(2) Security Management.
(3) Security Management and Check Point Security Gateway.
(4) Enterprise Log Server.
(5) Check Point Security Gateway and Enterprise Log Server.

Enter your selection  (1-5/a-abort) [1]: 1

Select installation type:
-------------------------

(1) Check Point Security Gateway.
(2) Security Management.
(3) Security Management and Check Point Security Gateway.
(4) Enterprise Log Server.
(5) Check Point Security Gateway and Enterprise Log Server.

Enter your selection  (1-5/a-abort) [1]: 1
Is this a Dynamically Assigned IP Address gateway installation ? (y/n) [n] ? 
Would you like to install a Check Point clustering product (CPHA, CPLS or State Synchronization)? (y/n) [n] ? y
IP forwarding disabled
Hardening OS Security: IP forwarding will be disabled during boot.
Generating default filter
Default Filter installed
Hardening OS Security: Default Filter will be applied during boot.
This program will guide you through several steps where you
will define your Check Point products configuration.
At any later time, you can reconfigure these parameters by
running cpconfig

Configuring Licenses and contracts...
=====================================
Host             Expiration  Signature                             Features            

Contract Coverage:

There is no contract coverage for the above licenses.
Note: The recommended way of managing licenses is using SmartUpdate.
cpconfig can be used to manage local licenses only on this machine.

Do you want to add licenses (y/n) [y] ? n


Configuring Random Pool...
==========================
Automatically collecting random data to be used in
various cryptographic operations.

    [....................]  

Automatic collection of random data is done.



Configuring Secure Internal Communication...
============================================
The Secure Internal Communication is used for authentication between
Check Point components

Trust State: Uninitialized
Enter Activation Key: 
Retype Activation Key: 

The Secure Internal Communication was successfully initialized

initial_module:
Compiled OK.

Hardening OS Security: Initial policy will be applied
until the first policy is installed

In order to complete the installation
you must reboot the machine.
Do you want to reboot? (y/n) [y] ? 



Choose a configuration item ('e' to exit):
------------------------------------------------------------------
1) Host name                    7) DHCP Server Configuration
2) Domain name                  8) DHCP Relay Configuration
3) Domain name servers          9) Export Setup
4) Time and Date               10) Products Installation
5) Network Connections         11) Products Configuration
6) Routing
------------------------------------------------------------------
(Note: configuration changes are automatically saved)
Your choice: 5

4. [cpmodule]# sysconfig
Choose a configuration item ('e' to exit):
------------------------------------------------------------------
1) Host name                    7) DHCP Server Configuration
2) Domain name                  8) DHCP Relay Configuration
3) Domain name servers          9) Export Setup
4) Time and Date               10) Products Installation
5) Network Connections         11) Products Configuration
6) Routing
------------------------------------------------------------------
(Note: configuration changes are automatically saved)
Your choice:


5. [cpmodule]# webui enable 4434
Shutting down cp_http_server_wd: [  OK  ]
Running cp_http_server_wd: [  OK  ]

6. Select Upgrade Path

7. Restore Image to R75 through Image Management Webui


8. Go to checkpoint website to download upgrade package from R75 to R75.40 Gaia.
http://dl3.checkpoint.com/paid/3c/Check_Point_Upgrade_for_R75.40.Splat_to_Gaia.tgz?HashKey=1390855121_58594d4de69e0eb524bb08b1bed646bc&xtn=.tgz

Note: Use Internet Explorer rather than Chrome since chrome will change file extention from .tgz to .gz, which is not accepted by Upgrade tab.

Note: Before update package, run Cpconfig and Sysconfig first.

9. Change host name, DNS, NTP configuration, SNMP, add interfaces info and static routes

10. Reset SIC and Rebuid Secure Internal Communication


11. Install Policy.

12. Failover test.


Tuesday, January 28, 2014

Upgrade Checkpoint from Command Line after failed from Webui

There is 2012 Appliance 4205 in the environment. Some basic configuration done, including internal interface and gateway. But after a couple of times failed attempt to upgrade OS from R75 Splat to R75.40 Gaia, I have to stop to see where is wrong.

The failed screenshot is showing in the following:



The package name is Check_Point_Upgrade_for_R75.40.Splat_to_Gaia.tgz download from https://supportcenter.checkpoint.com/supportcenter/portal/role/supportcenterUser/page/default.psml/media-type/html?action=portlets.DCFileAction&eventSubmit_doGetdcdetails=&fileid=14899&from=wizard.


Followed command line installation guide:

1. Upload the upgrade package through the GUI, it will be placed in: /var/log/cpupgrade/web/

2. Move upgrade.tgz into /var/upgrade

3. #tar -zxvf upgrade.tgz

4. #./UnixInstallScript -NOCRS
In R75.20 the install script is installme.sh

5. Reboot when complete and login to verify upgrade

Notes: 

Do not forget put idle 999 in, else you will get following auto log out messages:

[Expert@CP-Management]# ls
CPsecplPtchMod                                              base          lib                stam.tgz          upgrade_config.xml
Check_Point_R77.10_T151_upg_WEBUI_and_SmartUpdate.Gaia.tgz  content.txt   package_info.html  take_number.conf  vi.recover
RPMS                                                        cprid         resetips           upgrade           wrapper
SU                                                          installme.sh  scripts            upgradeClient

[Expert@CP-Management]# ./installme.sh 

Start Upgrading ..

Wait while creating upgrade image ... complete

Creating upgrade image is ok
[CP-Management]#
Idle timeout expired, performing auto-logout...




Actually, in my this case, the real reason for failure is because we did not run first time installation wizard and Checkpoint Package did not install first. After tried cpconfig finished first time installation wizard, upgrade was successful.

Tuesday, October 8, 2013

DSL Line - PPPoE on Cisco Router Configuration Template

interface GigabitEthernet0/0
 no ip address
 ip virtual-reassembly
 duplex auto
 speed auto
 pppoe enable group global
 pppoe-client dial-pool-number 1



interface GigabitEthernet0/1
 ip address 100.199.14.7 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto

interface Dialer1
 ip address negotiated
 ip mtu 1492
 ip nat outside
 ip virtual-reassembly
 encapsulation ppp
 ip tcp adjust-mss 1452
 dialer pool 1
 dialer-group 1
 ppp authentication pap callin
 ppp pap sent-username dsl@net.ca password 0 123456
!

ip nat inside source list 1 interface Dialer1 overload
ip nat inside source static 100.199.38.3 9.1.1.8
ip route 0.0.0.0 0.0.0.0 Dialer1

access-list 1 permit 100.199.38.0 0.0.0.255