Linux – information gathering (part 4)
This is the fourth part of Linux – information gathering.
Network
Find all available network connections.
ifconfig -a
In the following files you can find specific information about the desired network configuration.
cat /etc/network/interfaces cat /etc/sysconfig/network
You can find the configuration file for DNS resolvers here:
cat /etc/resolv.conf cat /etc/networks
With the administration tool for IPv4/IPv6 packet filtering and NAT you can list all filters.
iptables -L
Show or set the system’s host name.
hostname
Show the system’s DNS domain name.
dnsdomainname
Connections
The command „lsof“ lists open files.
lsof -i
List port socket numbers of standard services.
cat /etc/services
The command „netstat“ or “chkconfig” lists network connections
netstat -antup netstat -antpx netstat -tulpn
chkconfig --list
Cache
With „arp“ you can manipulate or display the kernel’s IPv4 network neighbour cache.
arp -e
The following command displays existing routes.
route
Previous parts
Linux – information gathering (part 1)
Linux – information gathering (part 2)