update readme with tcpdump example

This commit is contained in:
Rob Pearce 2021-07-11 10:32:28 +10:00
parent 9c071cf6a2
commit b80bdd309c
1 changed files with 17 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# Overview # Overview
Script to manage custom./etc/services entries. Script to manage custom /etc/services entries.
# Usage # Usage
Show usage Show usage
@ -59,6 +59,22 @@ Update system /etc/services with custom services
myservice 34777/udp myservice 34777/udp
rpearce@crom:serv$ rpearce@crom:serv$
Confirm updates are working
rpearce@crom:serv$ sudo tcpdump -i lo0 port 34777 &
[1] 54039
rpearce@crom:serv$ nc -v -u 127.0.0.1 34777
10:28:38.061303 IP localhost.58916 > localhost.myservice: UDP, length 1
10:28:38.061314 IP localhost.58916 > localhost.myservice: UDP, length 1
10:28:38.061318 IP localhost.58916 > localhost.myservice: UDP, length 1
10:28:38.061323 IP localhost.58916 > localhost.myservice: UDP, length 1
Connection to 127.0.0.1 port 34777 [udp/myservice] succeeded!
rpearce@crom:serv$ sudo kill 54039
4 packets captured
178 packets
rpearce@crom:serv$
Remove a custom service, and also update /etc/services Remove a custom service, and also update /etc/services
rpearce@crom:serv$ ./serv.sh -w rm myservice rpearce@crom:serv$ ./serv.sh -w rm myservice