First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Custom Host File Gets Removed Periodically on MacOS

  • retag add tags

I have a custom host file with name resolution for my IPs on my Mac, however this file appears to get removed once in awhile requiring me to paste my host file again into the Wireshark.app folder. This never happened on Windows.

Is there any way I can prevent this from happening?

Happens on MacOS Big Sur 11.6 and MacOS Monterey 12.6.

anonymous12's avatar
1
anonymous12
asked 2022-10-13 16:27:03 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Can you add output of wireshark -v or Help->About Wireshark:Wireshark to the question.

From the WSUG B.3. Configuration Files:

At program start, if there is a hosts file in the global configuration folder, it is read first. Then, if there is a hosts file in the personal configuration folder, that is read; if there is an entry for a given IP address in both files, the setting in the personal hosts file overrides the entry in the global hosts file.

Might be better to put hosts in your personal config folder in case something on the Mac is cleaning up the app directory.

Also from the WSUG:

The settings from this file are read in at program start and never written by Wireshark.

Chuckc's avatar
3k
Chuckc
answered 2022-10-13 16:57:06 +0000, updated 2022-10-13 17:08:44 +0000
edit flag offensive 0 remove flag delete link

Comments

Thanks Chuckc, I think this is the answer I was looking for. I found this directory under my home folder /Users/<my-username>/.config/wireshark. It's kind of unclear in the docs where $XDG_CONFIG_HOME/wireshark this location is, so hopefully I put it in the right spot. I'll let you know if the hosts file stays in place. Thank you!

anonymous12's avatar anonymous12 (2022-10-13 20:00:29 +0000) edit

Finding the paths is easiest by checking in the Wireshark gui or tshark -G folders.

B.2. Configuration File and Plugin Folders

A list of the folders Wireshark actually uses can be found under the Folders tab in the dialog box shown when you select About Wireshark from the Help menu.

Chuckc's avatar Chuckc (2022-10-13 21:05:24 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer