Categories
Kali Linux

NAS mount

Kali Linux live system does not have any persistent file system as default. If you would like to store the data on the live system, you may need external storage such as NAS(Network Attached Storage). The following mount.cifs command mounts a NAS file system to /mnt directory.

$sudo mount.cifs //192.168.0.10/home /mnt -o username=share-user 
Password for share-user@//192.168.0.10/home:   *******

where //192.168.0.10/home is the NAS IP address and shared directory, /mnt is the mounting point, and “share-user” is the NAS account name.

Since kali account does not have the write permission to /mnt, The write access to mounted directory requires sudo.

$sudo cp foo.txt /mnt/ 

To unmount the mounted NAS shared directory, use the umount command.

$sudo umount /mnt

Categories
Kali Linux

Kali Linux network routing priority

When Wi-Fi and Ethernet are both connected and Wi-Fi is the only way to to access the internet, kali linux default routing cannot access the internet. To access the internet on this system, Wi-Fi metric value should have lower value than Ethernet metric value.

The metric value of the network devices can be modified by nmcli command.

The following commands change Wi-Fi metric value from 600 to 50. After changing the metric value , Wi-Fi has lower metric value and the system can access the internet.

# default network setting 
kali@kali:$ ip r
default via 192.168.0.1 dev eth0 proto dhcp metric 100 
default via 192.168.10.1 dev wlan0 proto dhcp metric 600 
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.2 metric 100 
192.168.10.0/24 dev wlan0 proto kernel scope link src 192.168.10.9 metric 600 

# change wlan0 metric from 600 to 50
kali@kali:$ sudo nmcli connection modify access-point-name ipv4.route-metric 50
kali@kali:/mnt/tmp$ sudo nmcli connection up access-point-name
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5)

# current network setting
kali@kali:$ ip r
default via 192.168.10.1 dev wlan0 proto dhcp metric 50 
default via 192.168.0.1 dev eth0 proto dhcp metric 100 
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.2 metric 100 
192.168.10.0/24 dev wlan0 proto kernel scope link src 192.168.10.9 metric 50