Firewall or iptables settings


Letz say you need configure firewall. There is one simple way by iptables.

  1. Create sh file with shell commands. Example in the end this article.
  2. Execute this sh file for settings iptables: sudo ./
  3. Execute next command for save applyed settings iptables in some file on your directory: sudo iptables-save > myIptables.up.rules
  4. For allowing system restore iptables settings every time after restart add new file to the directory /etc/network/if-pre-up.d/ with next content:

. . .

Eazy stuff with linux


Watching to the connection

    netstat -nputw
    ss -nputw

Watching content changing in the file

    tail -f log.txt

. . .

tar, zip, etc stuff


Watching archive file content

    unzip -l

Update archive file

    zip newfile