Ask Your Question
0

Custom Host File Gets Removed Periodically on MacOS

asked 2022-10-13 16:27:03 +0000

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-10-13 16:57:06 +0000

Chuckc gravatar image

updated 2022-10-13 17:08:44 +0000

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.

edit flag offensive delete link more

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 gravatar imageanonymous12 ( 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 gravatar imageChuckc ( 2022-10-13 21:05:24 +0000 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2022-10-13 16:27:03 +0000

Seen: 109 times

Last updated: Oct 13 '22