Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 

Fw monitor script

the_rock
MVP Diamond
MVP Diamond
 
 
Here is script that would let you enter src. Dst, protocol (all the regular info) on CP firewall and then even asks yo
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free

Disclaimer: Check Point does not provide maintenance services or technical or customer support for third party content provided on this Site, including in CheckMates Toolbox. See also our Third Party Software Disclaimer.




10 Replies

the_rock
MVP Diamond
MVP Diamond

Basic capture I got from my lab fw...tested from 172.16.10.249 to quad 9 dns server

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Vincent_Bacher
MVP Silver
MVP Silver

Nice feature!
Two suggestions for improvement. If nothing is entered for src or dst, perhaps any should be used.

Pressing return results in an error.


And perhaps support for entering a network with a mask, e.g. 192.168.1.0/24.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


the_rock
MVP Diamond
MVP Diamond

Totally FAIR, Vince. I can definitely work on that.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Vincent_Bacher
MVP Silver
MVP Silver

While you're at it, you can – as I do in the scripts – protect the user from themselves
so that they don't enter la.le.lu.li/24 or 10.10.10.0/200 or 300.0.0.1,
by checking whether it is even a valid address/network 🙂

Of course, one can assume that the user knows what they are doing, but I like error handling in scripts.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


the_rock
MVP Diamond
MVP Diamond

Again, totally fair.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

the_rock
MVP Diamond
MVP Diamond

I made tcpdump script that does any, will test it tomorrow in the lab.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

the_rock
MVP Diamond
MVP Diamond

Here you go brother : - )

@Vincent_Bacher 

updated script, works with any. You can give it a go Monday.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Vincent_Bacher
MVP Silver
MVP Silver

I'm really sorry, but this won't be possible this week. I've just come back from the doctor's, and I've been signed off work for a week, with more tests to come.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


the_rock
MVP Diamond
MVP Diamond

never be sorry for stuff like that mate...health ALWAYS first, ALWAYS. Be well and get healthy.

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

the_rock
MVP Diamond
MVP Diamond

Just updated the script to work with any as srs/dst:

lab:


[Expert@CP-GW:0]# cd /var/log/scripts/
[Expert@CP-GW:0]# chmod 777 *
[Expert@CP-GW:0]# dos2unix *
dos2unix: converting file cp_tcpdump.sh to Unix format ...
dos2unix: converting file fwmonitor.sh to Unix format ...
[Expert@CP-GW:0]# ./fwmonitor.sh
Source (IP/hostname/any) [any]:
Destination (IP/hostname/any) [any]:
Port (1-65535/any) [any]:
Protocol (tcp/udp/icmp/any or number) [any]:
Output mode: (1) screen only (2) text file (3) capt

...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos