Daily tip

How to display all hosts in the localnet using ARP protocol?


For example by using the tool arp-scan and the following manner:


#arp-scan –interface=eth0 –localnet

Daily tip

Is it possible to access a service running in a docker container from Internet?

By default services running on a container are not accessible from outside, what you need to do, provided everything is configured correctly in terms of DNS, public IP and domain registration, is to publish a container port to the host as below.

#docker container run -d -p 80:80 apache

With the -d switch we run the container in background and
 -p container_port:host_port instructs the host to create a NAT rule to forward any request to the host port 80 to the internal container port 80.


Daily tip

How can I trace a full TCP segment for diagnosis purposes?

By installing tcpdump and using it with the below command syntax (you must be root or have sudo permissions).

#tcpdump -vvv [-i ] [port|host] -nnXSs 0

For instance, if you want to see in details what happens with any connection to and from the local web server (port 80) you type

#tcpdump -vvv -i any port 80 -nnXSs 0

Note that -i any means that tcpdump is listening on any network interface.