Language: EN

comandos-linux-redes

Linux Commands - Telecommunications and Network Operations

Here is a compilation of the most useful Linux commands for Telecommunications and network operations

Download Internet Files


#download file from webpage
wget www.website.com/file 


#download a file with the option to pause the download and resume later.
wget -c www.website.com/file 


#download entire webpage
wget -r www.website.com

Network Operations


#display Ethernet configuration
ifconfig eth0


#activate eth0 interface
ifup eth0


#disable eth0 interface
ifdown eth0


#configure an IP address
ifconfig eth0 192.168.1.1 netmask 255.255.255.0


#configure eth0 in promiscuous mode for packet capturing (sniffing)
ifconfig eth0 promisc


#activate the 'eth0' interface in dhcp mode
dhclient eth0


#display routing table
route -n


#configure default entry
route add -net 0/0 gw IP_Gateway


#configure static route to reach network '192.168.0.0/16'
route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1


#delete static route
route del 0/0 gw IP_gateway


#enable IP forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward


#display hostname
hostname


#look up host name to resolve the name to an IP address
host www.website.com


#look up host name to resolve the name to an IP address and vice versa
nslookup www.website.com


#display link status of all interfaces
ip link show


#display link status of eth0
mii-tool eth0


#display network card statistics for eth0
ethtool eth0


#display all active network connections and their PIDs
netstat -tup


#display all network listening services on the system and their PIDs
netstat -tupl


#display all HTTP traffic
tcpdump tcp port 80


#display wireless networks
iwlist scan


#display configuration of a wireless network card
iwconfig wlan0


#search Whois database
whois www.website.com

SSH, SCP and Tunneling


#start ssh session
ssh user@server.domain.com


#start ssh session with X11 compatibility (allows running visual tasks)
ssh -X user@machine 


#start ssh session on a specific port
ssh -p 15000 user@machine 


#copy file using scp
scp /file user@server.domain.com:/directory


#ssh tunnel creation
ssh -f user@server.domain.com -L 2000:server.domain.com:25 -N


#port redirection using tunneling
ssh -v -L4001:localhost:4001 user@server.domain.com

Microsoft Windows Networks (SAMBA)


#resolve bios network name
nbtscan ip_addr


#resolve bios network name
nmblookup -A ip_addr


#display remote actions of a host in windows
smbclient -L ip_addr/hostname

To see the complete compilation of Linux commands, click on this link: List of Linux commands