Ask Your Question
0

Custom Hosts file with IP range?

asked 2020-12-04 03:40:10 +0000

I just started with WireShark, and have created my custom hosts file, which is great for single line entries, but as a noob and watching my packet flowing by I have been picking out some unknow addresses to understand the protocols, then adding a NEW entry to my hosts file. My problem is I haven't memorized all the Microsoft used IP, so when I look the IP up it is in a RANGE, so my question is : can we make a range statement in the hosts file? OR is there a setting I have not discovered yet?

example : 52.96.0.0 => 52.115.255.255 : Microsoft 2603:1000:: => 2603:10FF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF : Microsoft

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-04 20:27:48 +0000

cmaynard gravatar image

As mentioned in the Wireshark man page, you can use the subnets file:

Name Resolution (subnets)

If an IPv4 address cannot be translated via name resolution (no exact match is found) then a partial match is attempted via the subnets file. Both the global subnets file and personal subnets files are used if they exist.

Each line of this file consists of an IPv4 address, a subnet mask length separated only by a / and a name separated by whitespace. While the address must be a full IPv4 address, any values beyond the mask length are subsequently ignored.

An example is:

# Comments must be prepended by the # sign! 192.168.0.0/24 ws_test_network

A partially matched name will be printed as "subnet-name.remaining-address". For example, "192.168.0.1" under the subnet above would be printed as "ws_test_network.1"; if the mask length above had been 16 rather than 24, the printed address would be ``ws_test_network.0.1".
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-12-04 03:40:10 +0000

Seen: 1,195 times

Last updated: Dec 04 '20