Firewall or iptables settings

linux

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 ./myIptables.sh
  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

linux

Watching to the connection

    netstat -nputw
    ss -nputw

Watching content changing in the file

    tail -f log.txt

. . .


tar, zip, etc stuff

linux

Watching archive file content

    unzip -l example.zip

Update archive file

    zip example.zip newfile