Some Computer Hints


Ubuntu Networking

To list all network interfaces in the system:

# lshw -class network

To get information about IP addresses and network statistics:

$ ip a
$ ifconfig

To do easy IP filtering (network firewall) use UFW. Some examples:

# ufw allow proto tcp from any to any port 13,22,25,80,443,587,995
# ufw allow from any to any port 53 comment NameServer
# ufw enable
# ufw status verbose
# ufw status numbered
# ufw insert 1 deny proto tcp from x.x.x.x to any port 80,443
# ufw delete 1

To gvfs-mount a remote filesystem over SSH to a local system, use the GIO commandline tool like this:

$ gio mount sftp://user_name@server_name

After that, you can use other gio commands or just switch to a virtual directory named like this:

$ cd /run/user/user_id/gvfs/sftp:host=server_name,user=user_name

and you can access the remote server’s root filesystem locally.