Linux Network Commands Flashcards

1
Q

Network connections

A

watch ss -tp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

TCP connections

A

netstat -ant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

UDP connections

A

netstat -anu

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Established connections

A

lsof -i

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Access Windows SMB share

A

smb:///share

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Mount Windows share

A

share user x.x.x.x c$

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

SMB connect

A

smbclient -U user \\\

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Set IP and netmask

A

ifconfig eth# /

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Set virtual interfaces

A

ifconfig eth0:1 /

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Set GW

A

route add default gw

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Change MTU size

A

ifconfig eth# mtu [size]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Change MAC

A

export MAC=xx:xx:xx:xx:xx:xx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Change MAC

A

ifconfig hw ether

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Backtrack MAC changer

A

macchanger -m

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Built-in WiFi scanner

A

iwlist scan

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Domain lookup for IP

A

dig -x

17
Q

Domain lookup for IP

A

host

18
Q

Domain SRV lookup

A

host -t SRV __tcp.url.com

19
Q

DNS Zone Xfer

A

dig @ domain -t AXFR

20
Q

DNS Zone Xfer

A

host -l

21
Q

Print existing VPN keys

A

ip xfer state list

22
Q

Adds ‘hidden’ interface

A

ip addr add / dev eth0

23
Q

List DHCP assignments

A

/var/log/messages | grep DHCP

24
Q

Block ip:port

A

tcpkill host and port

25
Q

Turn on IP Forwarding

A

echo “1” > /proc/sys/net/ipv4 ip_forward

26
Q

Add DNS Server

A

echo “nameserver x.x.x.x” > /etc/resolv.conf