[GH-ISSUE #17] [bug] netcat usage may be inproper for GNU's netcat in chaper 1. #22

Open
opened 2026-03-07 21:26:36 +03:00 by kerem · 0 comments
Owner

Originally created by @ClSlaid on GitHub (Jan 10, 2022).
Original GitHub issue: https://github.com/EmilHernvall/dnsguide/issues/17

I'm following your guide on my way to implementing my rust DNS server, but serval trials with your script on catching DNS querying packets lasted an empty query-packet.txt.

nc -u -l 1053 google.com

I'm using Arch Linux and my netcat version is GNU netcat 0.7.1. The proper way to catch the packet shall be as the following script, instead.

# use `-p` option explicitly
nc -u -l -p 1053 google.com

You might be using other versions of netcat, or the (GNU version) netcat itself had an update on its CLI. After all the script does not work on my environment, please take a look.

Originally created by @ClSlaid on GitHub (Jan 10, 2022). Original GitHub issue: https://github.com/EmilHernvall/dnsguide/issues/17 I'm following your guide on my way to implementing my rust DNS server, but serval trials with your [script](https://github.com/EmilHernvall/dnsguide/blame/master/chapter1.md#L126) on catching DNS querying packets lasted an empty `query-packet.txt`. ```bash nc -u -l 1053 google.com ``` I'm using Arch Linux and my `netcat` version is GNU netcat 0.7.1. The proper way to catch the packet shall be as the following script, instead. ```bash # use `-p` option explicitly nc -u -l -p 1053 google.com ``` You might be using other versions of `netcat`, or the (GNU version) `netcat` itself had an update on its CLI. After all the script does not work on my environment, please take a look.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dnsguide#22
No description provided.