User Tools

Site Tools


network_commands

If you want to send us your comments, please do so. Thanks
More on comments


Network commands

General considerations

We find these commands hard to work with, if they even work
This needs more study and trial and error testing

Show your IP

If you have access to a webserver you can run your own “show IP” service

General commands

CommandDescriptionRemark
adnshostA general-purpose DNS lookup utilityFrom the adns-tools package. Limited security support
adnslogresA logresolv programFrom the adns-tools package. Limited security support
adnsresfilterA filter which copies its input to its outputFrom the adns-tools package. Limited security support
arp-scanarp scanning and fingerprinting tool for discovering and fingerprinting IP hosts on the local network
arpwatchEthernet/FDDI station activity monitor
dsniffVarious tools to sniff network traffic for cleartext insecuritiesarpspoof, dnsspoof, dsniff, filesnarf, macof, mailsnarf, msgsnarf, sshmitm, sshow, tcpkill, tcpnice, urlsnarf, webmitm, webspy
iirc
ipshow / manipulate routing, devices, policy routing and tunnelsExamples:
ip addr
ip address
ip addr show enp1s1
ip link show
ip link set enp1s1 up
ip link set enp1s1 down
ip address add 192.168.1.0/24 dev enp1s1
ip address delete 192.168.1.0/24 dev enp1s1
ip2hostResolve IP's to hostnames in webserver logs
iptotalIP Traffic-based monitorRuns as a DAEMON=/usr/sbin/iptotald, starts from /etc/init.d/iptotal
iptstateIPTables State Top. A top-like display of IP Tables state table entriesInteractive commands
iputils-pingTools to test the reachability of network hostsping command
iptraf-ngncurses interactive colorful IP LAN monitorq Show the menu
lsmLink connectivity monitor tool
lsof -i tcp:8080Check which programs use port 8080
ncatConcatenate and redirect socketsPart of nmap. Successor of netcat
net-toolsPackage containing arp, ifconfig, netstat, rarp, nameif and route
netcatConcatenate and redirect socketsSucceded by ncat
netdiagPackage containing tcpblast, netload, trafshow, netwatch, statnet, tcpspray
netstatIs replaced by ss
netstat-natShow the natted connections on a linux iptable firewall
NetworkManagerNetwork management daemon
nm-connection-editorThis starts the GTK window that can also be started from the system tray
nm-onlineAsk NetworkManager whether the network is connectedFind the answer with echo $? 0: Online; 1: Offline; 2: Error
nm-toolUtility to report NetworkManager state and devicesObsolete?
nmcliCommand-line tool for controlling NetworkManagerExamples
nm-traySimple, pure Qt, NetworkManager front end with information icon residing in system tray
nmtuincurses NetworkManager tool to manage network connections
pingsend ICMP ECHO_REQUEST to network hostsping -4 -c 1 -q -w 3 &> /dev/null Only IPv$, only one ping, almost no output, quit after 3 seconds when no reply and discard all output. Useful in a script
sntoptop-like console network status toolShows if a website is up. In alarm or log mode a file is executed on the occurence of change in status of a given host
ssAnother utility to investigate socketsReplaces netstat which is deprecated. ss is part of the iproute2 package
systemctl restart networking
wicd-cli
wicd-curus

Programs in the iproute2 package

CommandDescriptionRemark
arpd
iputils-arpingARP ping
bridge
ctstat
devlink
ip
lnstat
nstat
routef
routel
rtacct
rtmon
rtstat
ss
tc
tipc

Interfaces

CommandDescriptionRemark
dhclientDynamic Host Configuration Protocol ClientGeneral
ifdown
ifup
ifquery
ifconfigconfigure a network interfaceGeneral

Wireless LAN

CommandDescriptionRemark
iwshow / manipulate wireless devices and their configurationWiFi
iwconfigDeprecated and replaced by iw
iwlistGet more detailed wireless information from a wireless interfaceWiFi

Examples

CommandRemark
dhclient wlan0
nmcli dev wifi
iwlist wlan0 scan | grep -i ssid
iw dev wlan0 scan | grep SSID
ifconfig wlan0 up
ifdown eth0; ifup eth0
ip addrShow information for all addresses. Shows IP numbers of the host
ip link show wlan0
ip link show enp7s0
ip routeShow the routingtable and thereby the IP address of the router the host is connected to
ip set link eth0 downBring link eth0 down
ip set link eth0 upBring link eth0 up
iw wlan0 link
iw dev wlan0 station dumpiw dev wlan0 station dump Does the same
iw wlan0 disconnectDisconnects and reconnects automatically again
nmcli dev wifi connect SSID password SSID_pawsswordDoes not work at this moment
nmcli generalOutput: STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN connected full enabled enabled enabled enabled
ifconfig wlan0 down
ifconfig wlan0 up
ifconfig -v eth0 192.168.1.6Assing IP address 192.168.1.6 to network interface eth0 and bring it up

File locations

FileFunction
/etc/networksHolds the local network addresses
/etc/network/interfacesavailable network interfaces
/etc/dhcp/dhclient.confConfiguration file for /sbin/dhclient
/etc/host.conf
/etc/hostnameHolds the hostname of the computer
/etc/hostsHolds the hostlist. See also hosts.allow hosts.deny
/etc/resolv.confDNS servers
/etc/NetworkManager/NetworkManager.conf

iw documentation
Network Configuration
Debian static IP address
How to connect to a WPA/WPA2 WiFi network using Linux command line


Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
network_commands.txt · Last modified: 16-01-2024 17:33 by wim