blob: a6d547b8cb7fe8c96d0c90110733fa8fc296aaa6 (
plain)
1 ## Description
2
3 Netexpand will list every ip address in a given range, including broadcast and
4 network addresses.
5
6 An example usage for this program might be to use it to calculate every rule in
7 a firewall that uses slash notation for subnets (for an audit perhaps).
8
9
10 ## Example
11
12 A simple example of calculating every ip address in the 127.0.0.1/16 range.
13
14 $ netexpand 127.0.0.1/16
15 127.0.0.1
16 127.0.0.2
17 127.0.0.3
18 127.0.0.4
19 127.0.0.5
20 127.0.0.6
21 127.0.0.7
22 ...
23
24
25 Another slightly more complex example of using a bash for loop to feed ipv4
26 networks to netexpand for creating a complete list of all ips with rules in a
27 firewall.
28
29 for i in $(cat fwnets.txt); do
30 netexpand ${i}
31 done
|