PUBLISH 09-Sep-2018 LAST UPDATE: 09-Sep-2018
You will find below some very useful network commands in Linux that will help make you task alot easier
Commands | Description |
---|---|
watch ss -tp |
Network connections |
netstat -ant |
Tcp connections -anu=udp |
netstat -tulpn |
Connections with PIDs |
lsof -i |
Established connections |
smb:// ip /share |
Access windows smb share |
share user x.x.x.x c$ |
Mount Windows share |
smbclient -0 user \\\\ ip \\ share |
Sl1B connect |
ifconfig eth# ip / cidr |
Set IP and netmask |
ifconfig ethO:l ip / cidr |
Set virtual interface |
route add default gw gw lp |
Set GW |
ifconfig eth# mtu [size] |
Change MTU size |
export MAC=xx: XX: XX: XX: XX: XX |
Change MAC |
ifconfig int hw ether MAC |
Change MAC |
macchanger -m MAC int |
Backtrack MAC changer |
iwlist int scan |
Built-in wifi scanner |
dig -x ip |
Domain lookup for IP |
host ip |
Domain lookup for IP |
host -t SRV_service_tcp.url.com |
Domain SRV lookup |
dig @ ip domain -t AXrR |
DNS Zone Xfer |
host -1 domain namesvr |
DNS Zone Xfer |
ip xfrm state list |
Print existing VPN keys |
ip addr add ip / cidr dev ethO |
Adds 'hidden' interface |
/var/log/messages | grep DHCP |
List DHCP assignments |
tcpkill host ip and port port |
Block ip:port |
echo "1" /proc/sys/net/ipv4/ip forward |
Turn on IP Forwarding |
echo "nameserver x.x.x.x" /etc7resolv.conf |
Add DNS Server |
CONTACT US