With IP and netmask:
ifconfig -a |grep -B 1 inet |grep encap| awk '{print $1}' | grep -v lo | grep -v bond | grep -v ":" | grep -v ^lo | xargs -I % sh -c 'echo %;more $FWDIR/state/local/FW1/local.set | grep -A 8 %|grep ip| tr \a\d\r\:\(\) \ ;echo -n " mask " ;ifconfig % | sed -rn "2s/ .*:(.*)$/\1/p";echo " spoofing networks:";more $FWDIR/state/local/FW1/local.set | grep -A 30 %|grep ": (\""|sort -ng| uniq |tr \(\)\<\>\:\" \ ;echo " "'
More see in this article:
https://community.checkpoint.com/docs/DOC-2990-show-address-spoofing-networks-via-cli
Output:
eth0 < Interface
ip 10.1.1.251 < IP
ip 10.1.1.252
mask 255.255.255.0 < Netmask
spoofing networks:
10.0.0.0, 10.255.255.255 < spoofing networks
192.168.1.0, 192.168.1.255
eth2
ip 1.1.1.211
ip 1.1.1.212
mask 255.255.255.0
spoofing networks:
0.0.0.0, 9.255.255.255
11.0.0.0, 126.255.255.255
128.0.0.0, 192.168.41.255
192.168.220.0, 223.255.255.255
192.168.4.0, 192.168.8.255
240.0.0.0, 255.255.255.254
eth3
ip 192.168.2.131
ip 192.168.2.132
mask 255.255.255.0
spoofing networks:
192.168.2.0, 192.168.2.255
eth5
ip 10.172.1.102
ip 10.172.1.103
mask 255.255.255.0
spoofing networks:
10.172.1.0, 10.172.1.255
PS:
Here two IP addresses are visible, because it is a cluster with vip.
➜ CCSM Elite, CCME, CCTE ➜ www.checkpoint.tips