Wednesday, April 8, 2020

HOWTO recover a corrupted SRX file system

In this post, I will show you how you can use a functional Juniper SRX to repair a corrupt SRX firewall by using a usb-drive.

The 1st steps are to have a similar model SRX and a usb-drive. On the working SRX, you will build snapshot and specify the usb-drive as the media type.

      request system snapshot media usb





This can take some time, so be patient.


Next, insert the usb-drive into the bad SRX and power on. The device should scan the usb bus and boot from this drive. The time could be upwards to 10-15mins before it has fully boot.

Next, login into the SRX  device;



It's a good time to look over the storage ;






And finally, you will do the 2nd snapshot but this time to media internal.

     request system snapshot media internal



 This could take some time so be patient.



This should net you a snapshot of the current junos version and configuration to the internal drive from the usb-drive that was insert.




NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \


Tuesday, April 7, 2020

Checkpoint Security Gateway traffic-selectors for route-base

This is a common missed item when working with checkpoint and route-based vpns that uses 0.0.0.0/0 for the security-associations.

In the "vpn-communities" properties , you need to set the vpn type as one vpn tunnel per gateway  for route-based vpns that uses 0.0.0.0/0s for proxy-id {aka traffic selectors }

If you do not enable this, you will have mismatches and the tunnel will never work.



TIP: use the expert mode to see the negotiate for the SPI inbound and outbound

e.g
 
   fw tab -t inbound_SPI -m 1000 
   fw tab -t outbound_SPI -m 1000 

It would look similar to the below when all 0s are in play.

  9:26:37 5 N/A  N/A    10.20.204.4 > N/A  LogId: <max_null>; ContextNum: <max_null>; OriginSicName: <max_null>; SPI: 13608394; Protocol: IPSEC_ESP_SA(2); Schema: IKE(3); Me: 172.20.12.9; Peer: 12.0.1.132; Owner: 127.0.0.1; MyRange:First: ; Last: 255.255.255.255; PeerRange:First: ; PeerLast: 255.255.255.255; HWInitialized: NO; MSPI: 4160; Host: 172.20.12.9; Expires: 2327/3610; LastUpdateTime:  3Apr2020  9:26:37; ProductName: VPN-1 & FireWall-1; ProductFamily: Network;





NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \

Sunday, April 5, 2020

How to make a RSI for juniper SRX

For juniper support it's common to build a RSI ( request support information ) for the JTAC. IN this post, I will show you a simple one step  method to building and compressing a RSI file

From the cli you can string the commands to simplify the task.

start shell command "cli -c 'request support information | save /var/log/RSI-APR03-2020.txt ; file compress file /var/log/RSI-APR03-2020.txt '"


You can monitor the file creation and size via the following command


    file list /var/log/RSI* detail







NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \

Friday, April 3, 2020

IPV6 tunnel and Juniper SRX

My ISP changed address on me, so I had to update my  hurricane electric ipv6 tunnel configuration and figure I would write about the tunnel concept. I've previously written about HE tunnel broker many times in the past

http://socpuppet.blogspot.com/2014/07/getting-free-ipv6-experience-by-using.html


Hurricane Electric has one of the best free ipv6 tunnel-broker service.  The tunnelbroker.ch is also good and has a simpler interface. The later has less gateway, a simpler interface  but works just the same as HurricaneElectric.

In the JunoSRX you must use the "ip" interface which is proto 41 { IP n IP} for the interface type.


So in the above we have 2 tunnels configured for services unit 0 & 1. I'm using  HE for the local lan and have a /64 prefix available. We are using  ipv6 advertisements for stateless configuration.


This allows my mac , linux, window hosts to acquire a address for the lan.




Now we can test  ipv6 access once my policy has been applied


Here's me testing iv6 dns and my pings to gmail.com




You can use " show security flow session family inet6" to see any ipv6 sessions on the SRX.

I hope this helps .



NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \

Monday, March 16, 2020

CHECKPOINT VPN Diagnostic commands output TIP

I learned something a few days ago when looking at the encryption domain. if you add the -m <xxx> you can see more items than without,

So commands  that might have a long list similar to below;


  fw tab -t vpn_enc_domain -f 
  fw tab -t inbound_SPI -f 
  fw tab -t outbound_SPI -f 

etc.....



If you have a long list of details the output will be cut and truncated, so if you add more with the "-m 100" you can see more in the list output. I hope this might come handy.










NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \

Monday, February 24, 2020

How many ways to determine checkPoint Security Gateway type

Here's a few ways to check  a CPSG  model type.


  dmidecode | grep Product 

 ipsctl -a | grep modelname

 cpstat -f all os | grep -i name

 show asset system


These can help you in your CPSG details.









NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \

Thursday, January 30, 2020

Using RIS for BGP route monitoring

RIPE RIS can be used for analysis of BGP updates or other source for BGP forensics.

https://www.ripe.net/analyse/internet-measurements/routing-information-service-ris

The access is simple and free. You can use curl to access the information or write python interface to query for information.

e.g { the prefix that my  home ISP lives in }

curl -s "https://ris-live.ripe.net/v1/stream/?format=json" -H 'X-RIS-Subscribe: {"prefix": "199.188.248.0/21"}'

And output would be similar to the following;



For traffic analysis you can query bgp message types;


You can string key/valuepair attributes to drill in and to reduce the number of matches, here I'm looking or interested in the remote-route-collector 00 & NOTIFICATIONS


If you knew the underlaying  rcc and it's peers, you can find BGP opens



So the options are quite flexible and wide. A organization could build a BGP message analysis database for querying to research events internal to it's BGP topology and to help analysis BGP flaps,events,outages or help with RCAs.









NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o

        /  \