From d54e31189c08d6ade76e4f153b2ec2b32f77cfce Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Sun, 18 Sep 2016 22:13:53 +0100 Subject: changed Silvino Silva to c9 Team and added team page --- tools/vim.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/vim.html') diff --git a/tools/vim.html b/tools/vim.html index e633670..7848b8b 100644 --- a/tools/vim.html +++ b/tools/vim.html @@ -151,7 +151,7 @@ Systools Index

This is part of the c9-doc Manual. Copyright (C) 2016 - Silvino Silva. + c9 Team. See the file Gnu Free Documentation License for copying conditions.

-- cgit From 183caada9a628fb2200b6ffe5a43e06ef7830fce Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Sun, 18 Sep 2016 22:15:12 +0100 Subject: converted c9 Team to lower char --- core/bash.html | 2 +- core/configure.html | 2 +- core/dash.html | 2 +- core/exim.html | 2 +- core/index.html | 2 +- core/install.html | 2 +- core/linux.html | 2 +- core/network.html | 2 +- core/package.html | 2 +- core/ports.html | 2 +- core/reboot.html | 2 +- core/tmux.html | 2 +- core/tty-terminal.html | 2 +- team.html | 2 +- tools/gitolite.html | 2 +- tools/index.html | 2 +- tools/logrotate.html | 2 +- tools/lynx.html | 2 +- tools/mutt.html | 2 +- tools/nginx.html | 2 +- tools/openssh.html | 2 +- tools/postgresql.html | 2 +- tools/qemu.html | 2 +- tools/squid.html | 2 +- tools/storage.html | 2 +- tools/syslog-ng.html | 4 ++-- tools/tar.html | 2 +- tools/vim.html | 2 +- 28 files changed, 29 insertions(+), 29 deletions(-) (limited to 'tools/vim.html') diff --git a/core/bash.html b/core/bash.html index 1b0ac5d..2c1f6e9 100644 --- a/core/bash.html +++ b/core/bash.html @@ -126,7 +126,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/configure.html b/core/configure.html index 5d44555..74c2a39 100644 --- a/core/configure.html +++ b/core/configure.html @@ -292,7 +292,7 @@ Core OS Index

This is part of the c9 Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/dash.html b/core/dash.html index 755a384..18045e5 100644 --- a/core/dash.html +++ b/core/dash.html @@ -21,7 +21,7 @@ Core OS Index

This is part of the c9 Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/exim.html b/core/exim.html index f5231c1..d6f9982 100644 --- a/core/exim.html +++ b/core/exim.html @@ -213,7 +213,7 @@

This is part of the c9 Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/index.html b/core/index.html index 9682bba..147d160 100644 --- a/core/index.html +++ b/core/index.html @@ -120,7 +120,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/install.html b/core/install.html index 0fa3de1..f956cf4 100644 --- a/core/install.html +++ b/core/install.html @@ -367,7 +367,7 @@ Core OS Index

This is part of the c9 Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/linux.html b/core/linux.html index 87eeec5..53fc304 100644 --- a/core/linux.html +++ b/core/linux.html @@ -124,7 +124,7 @@ Core OS Index

This is part of the c9-doc Manual. Copyright (C) 2016 -c9 Team. +c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/network.html b/core/network.html index 15ff52c..04f1266 100644 --- a/core/network.html +++ b/core/network.html @@ -318,7 +318,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/package.html b/core/package.html index fe2069a..21c029a 100644 --- a/core/package.html +++ b/core/package.html @@ -182,7 +182,7 @@ Core OS Index

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/ports.html b/core/ports.html index 0cf19e8..1d06877 100644 --- a/core/ports.html +++ b/core/ports.html @@ -208,7 +208,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/reboot.html b/core/reboot.html index 75a41d4..3a6758d 100644 --- a/core/reboot.html +++ b/core/reboot.html @@ -123,7 +123,7 @@ Core OS Index

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/tmux.html b/core/tmux.html index 3b00934..d1ab587 100644 --- a/core/tmux.html +++ b/core/tmux.html @@ -110,7 +110,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/core/tty-terminal.html b/core/tty-terminal.html index 7a4d5dc..47f7bf0 100644 --- a/core/tty-terminal.html +++ b/core/tty-terminal.html @@ -74,7 +74,7 @@ Core OS Index

This is part of the c9 Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/team.html b/team.html index a95f64b..ea74a7a 100644 --- a/team.html +++ b/team.html @@ -2,7 +2,7 @@ - c9 Team + c9 team diff --git a/tools/gitolite.html b/tools/gitolite.html index bae0071..8616798 100644 --- a/tools/gitolite.html +++ b/tools/gitolite.html @@ -423,7 +423,7 @@ Tools Index

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/index.html b/tools/index.html index d20efe6..b94bc98 100644 --- a/tools/index.html +++ b/tools/index.html @@ -124,7 +124,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/logrotate.html b/tools/logrotate.html index 7b06dd9..39da406 100644 --- a/tools/logrotate.html +++ b/tools/logrotate.html @@ -157,7 +157,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 -c9 Team. +c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/lynx.html b/tools/lynx.html index 30c8d30..618e482 100644 --- a/tools/lynx.html +++ b/tools/lynx.html @@ -9,7 +9,7 @@
         # Description: Text-based web browser.
         # URL: http://lynx.isc.org/
-        # Packager: c9 Team, silvino at bk dot ru
+        # Packager: c9 team, silvino at bk dot ru
         # Depends on: ncurses openssl zlib
 
         name=lynx
diff --git a/tools/mutt.html b/tools/mutt.html
index 058fd43..276fb51 100644
--- a/tools/mutt.html
+++ b/tools/mutt.html
@@ -310,7 +310,7 @@
         

This is part of the SysDoc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/nginx.html b/tools/nginx.html index 9bec4ec..ad5345d 100644 --- a/tools/nginx.html +++ b/tools/nginx.html @@ -326,7 +326,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/openssh.html b/tools/openssh.html index 540e506..ca504b2 100644 --- a/tools/openssh.html +++ b/tools/openssh.html @@ -296,7 +296,7 @@ Tools Index

This is part of the c9-doc Manual. Copyright (C) 2016 -c9 Team. +c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/postgresql.html b/tools/postgresql.html index b235274..e160ae2 100644 --- a/tools/postgresql.html +++ b/tools/postgresql.html @@ -238,7 +238,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/qemu.html b/tools/qemu.html index 5a31b86..e1ea277 100644 --- a/tools/qemu.html +++ b/tools/qemu.html @@ -141,7 +141,7 @@ Tools Index

This is part of the c9 Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/squid.html b/tools/squid.html index 74362b3..363edba 100644 --- a/tools/squid.html +++ b/tools/squid.html @@ -67,7 +67,7 @@ ssl_bump bump all Tools Index

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/storage.html b/tools/storage.html index 70d2ae8..121c802 100644 --- a/tools/storage.html +++ b/tools/storage.html @@ -370,7 +370,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/syslog-ng.html b/tools/syslog-ng.html index 07970c0..5d6fd2d 100644 --- a/tools/syslog-ng.html +++ b/tools/syslog-ng.html @@ -68,7 +68,7 @@
         # Description: alternate syslogging daemon
         # URL:         http://www.balabit.com/network-security/syslog-ng/opensource-logging-system
-        # Packager:    c9 Team, silvino at bk dot ru
+        # Packager:    c9 team, silvino at bk dot ru
         # Depends on:  eventlog, glib, libwrap
 
         name=syslog-ng
@@ -253,7 +253,7 @@
 
         

This is part of the c9-doc Manual. Copyright (C) 2016 -c9 Team. +c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/tar.html b/tools/tar.html index 15e779f..edd733d 100644 --- a/tools/tar.html +++ b/tools/tar.html @@ -113,7 +113,7 @@

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/vim.html b/tools/vim.html index 7848b8b..03ba767 100644 --- a/tools/vim.html +++ b/tools/vim.html @@ -151,7 +151,7 @@ Systools Index

This is part of the c9-doc Manual. Copyright (C) 2016 - c9 Team. + c9 team. See the file Gnu Free Documentation License for copying conditions.

-- cgit From 9741df07f44b23ce7ac66a55cef65fe6c9c45b37 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Thu, 22 Sep 2016 02:10:51 +0100 Subject: final 0.2.1 revision --- core/conf/skel/.bashrc | 19 +-- core/conf/skel/.profile | 4 +- core/conf/skel/.tmux.conf | 2 + host.html | 103 ++++++++++++ tools/conf/etc/skel/.mutt/muttrc | 34 ++-- tools/conf/etc/skel/.vimrc | 207 +++++++++++------------- tools/gnupg.html | 5 + tools/index.html | 2 +- tools/mutt.html | 74 ++++----- tools/scipts/iptables.sh | 337 +++++++++++++++++++++++++++++++++++++++ tools/vim.html | 15 +- 11 files changed, 615 insertions(+), 187 deletions(-) create mode 100644 host.html create mode 100644 tools/scipts/iptables.sh (limited to 'tools/vim.html') diff --git a/core/conf/skel/.bashrc b/core/conf/skel/.bashrc index 38f4b24..9a7498e 100644 --- a/core/conf/skel/.bashrc +++ b/core/conf/skel/.bashrc @@ -21,7 +21,6 @@ shopt -s histappend HISTSIZE=1000 HISTFILESIZE=2000 -alias tmux="tmux -2" alias rm='rm -i' #alias cp='cp -i' @@ -46,12 +45,14 @@ glog () { git log --graph --abbrev-commit --decorate --date=relative --all } -if [[ -z "$TMUX" ]] ;then - ID="`tmux ls | grep -vm1 attached | cut -d: -f1`" # get the id of a deattached session - if [[ -z "$ID" ]] ;then # if not available create a new one - tmux new-session - else - tmux attach-session -t "$ID" # if available attach to it - fi -fi +#alias tmux="tmux -2" +#if [[ -z "$TMUX" ]] ;then +# ID="`tmux ls | grep -vm1 attached | cut -d: -f1`" # get the id of a deattached session +# if [[ -z "$ID" ]] ;then # if not available create a new one +# tmux new-session +# else +# tmux attach-session -t "$ID" # if available attach to it +# fi +#fi +# diff --git a/core/conf/skel/.profile b/core/conf/skel/.profile index 58f821e..71dd6f8 100644 --- a/core/conf/skel/.profile +++ b/core/conf/skel/.profile @@ -1,6 +1,6 @@ export GPG_AGENT_INFO # the env file does not contain the export statement export SSH_AUTH_SOCK # enable gpg-agent for ssh -export GPGKEY=EE29B7D3 +export GPGKEY=8BF422F7 -alias prodtmux="ssh prod -t tmux a" +#alias prodtmux="ssh srv-remote -t tmux a" diff --git a/core/conf/skel/.tmux.conf b/core/conf/skel/.tmux.conf index 795aff6..a68ccb2 100644 --- a/core/conf/skel/.tmux.conf +++ b/core/conf/skel/.tmux.conf @@ -23,3 +23,5 @@ set -g bell-action any bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'" bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'" +# Torn on mouse +set -g mouse on diff --git a/host.html b/host.html new file mode 100644 index 0000000..9a2ca1c --- /dev/null +++ b/host.html @@ -0,0 +1,103 @@ + + + + + Host Description + + + Documentation Index +

Host Description

+ +

Core

+
+
Base OS
+
Gnu/Linux Crux 3.2
+
Download
+ +
Package Management
+
Ports
+
Package Management
+ +
Storage
+
Ext4, Btrfs
+
Partitions
+
Fstab
+ +
Hostname
+
c9
+
Hostname
+
+ +

Network

+ +
+
Network
+ +
Network is + configured via init + scripts, /etc/rc.d/net + script is targeted to configure ethernet interface while + /etc/rc.d/wlan + for handling wireless interface. Wlan script always call + dhcpd to listen on wireless interface. + Both scripts setup default gateway route.
+ +
Firewall
+ +
Firewall is configured using + iptables with help + of iptables.sh script.
+ +
Access Point/Router
+ +
Wireless interface handle access point. +
+
Access Point
+ +
FQDN
+ +
core.privat-server.net
+
Hostname
+
Exim certificates
+
Dnsmasq
+
Exim certificates
+ +
DNS
+
Dns encryption
+
Dns cache
+
+ +

DevOps

+
+
Dns
+
Dns Server
+ +
SSH
+
SSH Server
+
Local Identities
+ +
Git
+
Gitolite
+ +
Database
+
Postgresql
+ +
Web Server
+
Nginx
+ +
+ +

Services

+
+
Main Web Portal
+
Web Application
+
+ + Documentation Index +

This is part of the c9 Manual. + Copyright (C) 2016 + c9 team. + See the file Gnu Free Documentation License + for copying conditions.

+ + diff --git a/tools/conf/etc/skel/.mutt/muttrc b/tools/conf/etc/skel/.mutt/muttrc index aa41d50..6ec1da4 100644 --- a/tools/conf/etc/skel/.mutt/muttrc +++ b/tools/conf/etc/skel/.mutt/muttrc @@ -13,32 +13,22 @@ set duplicate_threads=yes set crypt_use_gpgme=yes -set pgp_timeout=1800 +## automatically sign all outgoing messages +set crypt_autosign=yes -## sign only replies to signed messages -set crypt_replysign=yes +## automatically encrypt outgoing messages +set crypt_autoencrypt=yes -## encrypt and sign replies to encrypted messages -set crypt_replysignencrypted=yes +## automatically verify the sign of a message when opened +set crypt_verify_sig=yes -#source ~/.mutt/gpg.rc -# -#set pgp_autosign=yes -#set pgp_sign_as=0xEE29B7D3 +set pgp_sign_as=0x8BF422F79FC7C975BDF07828E88440BC35095A74 +#set pgp_sign_as=0x8BF422F7 +set pgp_timeout=1800 +set pgp_autosign=yes #set pgp_replyencrypt=yes -# -## automatically sign all outgoing messages -#set crypt_autosign -# -## automatically encrypt outgoing messages -##set crypt_autoencrypt=yes -# -## encrypt only replies to signed messages -#set crypt_replyencrypt=yes -# -## automatically verify the sign of a message when opened -#set crypt_verify_sig=yes -# + +source ~/.mutt/gpg.rc source "~/.mutt/mail_alias" set alias_file=~/.mutt/mail_alias diff --git a/tools/conf/etc/skel/.vimrc b/tools/conf/etc/skel/.vimrc index cf143fd..9958538 100644 --- a/tools/conf/etc/skel/.vimrc +++ b/tools/conf/etc/skel/.vimrc @@ -1,26 +1,10 @@ -" An example for a vimrc file. -" -" Maintainer: Bram Moolenaar -" Last change: 2015 Mar 24 -" -" To use it, copy it to -" for Unix and OS/2: ~/.vimrc -" for Amiga: s:.vimrc -" for MS-DOS and Win32: $VIM\_vimrc -" for OpenVMS: sys$login:.vimrc - -" When started as "evim", evim.vim will already have done these settings. -if v:progname =~? "evim" - finish -endif - " Use Vim settings, rather than Vi settings (much better!). " This must be first, because it changes other options as a side effect. set nocompatible -" allow backspacing over everything in insert mode -set backspace=indent,eol,start - +"" allow backspacing over everything in insert mode +"set backspace=indent,eol,start +" if has("vms") set nobackup " do not keep a backup file, use versions instead else @@ -33,118 +17,119 @@ set ruler " show the cursor position all the time set showcmd " display incomplete commands set incsearch " do incremental searching -" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries -" let &guioptions = substitute(&guioptions, "t", "", "g") - -" Don't use Ex mode, use Q for formatting -map Q gq - -" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, -" so that you can undo CTRL-U after inserting a line break. -inoremap u - -" In many terminal emulators the mouse works just fine, thus enable it. -if has('mouse') - set mouse=a -endif - -" Switch syntax highlighting on, when the terminal has colors -" Also switch on highlighting the last used search pattern. +"" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries +"" let &guioptions = substitute(&guioptions, "t", "", "g") +" +"" Don't use Ex mode, use Q for formatting +"map Q gq +" +"" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, +"" so that you can undo CTRL-U after inserting a line break. +"inoremap u +" +"" In many terminal emulators the mouse works just fine, thus enable it. +"if has('mouse') +" set mouse=a +"endif +" +"" Switch syntax highlighting on, when the terminal has colors +"" Also switch on highlighting the last used search pattern. if &t_Co > 2 || has("gui_running") syntax on set hlsearch colorscheme wombat256mod endif -" Only do this part when compiled with support for autocommands. -if has("autocmd") - - " Enable file type detection. - " Use the default filetype settings, so that mail gets 'tw' set to 72, - " 'cindent' is on in C files, etc. - " Also load indent files, to automatically do language-dependent indenting. - filetype plugin indent on - - " Put these in an autocmd group, so that we can delete them easily. - augroup vimrcEx - au! - - " For all text files set 'textwidth' to 78 characters. - autocmd FileType text setlocal textwidth=78 - - " When editing a file, always jump to the last known cursor position. - " Don't do it when the position is invalid or when inside an event handler - " (happens when dropping a file on gvim). - autocmd BufReadPost * - \ if line("'\"") >= 1 && line("'\"") <= line("$") | - \ exe "normal! g`\"" | - \ endif - - augroup END - -else - - set autoindent " always set autoindenting on - -endif " has("autocmd") - -" Convenient command to see the difference between the current buffer and the -" file it was loaded from, thus the changes you made. -" Only define it when not defined already. -if !exists(":DiffOrig") - command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis - \ | wincmd p | diffthis -endif - -if has('langmap') && exists('+langnoremap') - " Prevent that the langmap option applies to characters that result from a - " mapping. If unset (default), this may break plugins (but it's backward - " compatible). - set langnoremap -endif - +" +"" Only do this part when compiled with support for autocommands. +"if has("autocmd") +" +" " Enable file type detection. +" " Use the default filetype settings, so that mail gets 'tw' set to 72, +" " 'cindent' is on in C files, etc. +" " Also load indent files, to automatically do language-dependent indenting. +" filetype plugin indent on +" +" " Put these in an autocmd group, so that we can delete them easily. +" augroup vimrcEx +" au! +" +" " For all text files set 'textwidth' to 78 characters. +" autocmd FileType text setlocal textwidth=78 +" +" " When editing a file, always jump to the last known cursor position. +" " Don't do it when the position is invalid or when inside an event handler +" " (happens when dropping a file on gvim). +" autocmd BufReadPost * +" \ if line("'\"") >= 1 && line("'\"") <= line("$") | +" \ exe "normal! g`\"" | +" \ endif +" +" augroup END +" +"else +" +" set autoindent " always set autoindenting on +" +"endif " has("autocmd") +" +"" Convenient command to see the difference between the current buffer and the +"" file it was loaded from, thus the changes you made. +"" Only define it when not defined already. +"if !exists(":DiffOrig") +" command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis +" \ | wincmd p | diffthis +"endif +" +"if has('langmap') && exists('+langnoremap') +" " Prevent that the langmap option applies to characters that result from a +" " mapping. If unset (default), this may break plugins (but it's backward +" " compatible). +" set langnoremap +"endif +" map :tabnew map :tabprevious map :tabnext - -" Show Line Numbers +" +"" Show Line Numbers set nu -set complete=.,b,u,] -set wildmode=longest,list:longest -set completeopt=menu,preview - -" Directories +"set complete=.,b,u,] +"set wildmode=longest,list:longest +"set completeopt=menu,preview +" +"" Directories set backupdir=~/.vim/backup set undodir=~/.vim/undodir set viewdir=~/.vim/views set directory=~/.vim/swap - -" Spell Check +" +"" Spell Check set spell spelllang=en_us - -" Strips whitespace +" +"" Strips whitespace nnoremap W :%s/\s\+$//:let @/='' - -" Whitespace fixes +" +"" Whitespace fixes highlight ExtraWhitespace ctermbg=red guibg=red + match ExtraWhitespace /\s\+$/ autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@ +
+        $ chmod 700 ~/.gnupg
+        $ chmod -R 600 ~/.gnupg/*
+        
+

2. Generate keys

Options for creating a DSA and ElGamal key;

diff --git a/tools/index.html b/tools/index.html index 55cf6c4..e5adac6 100644 --- a/tools/index.html +++ b/tools/index.html @@ -27,7 +27,7 @@
  • 1. Vim RC
  • 2. Color schemes
  • -
  • 3. Spaces and tabs
  • +
  • 3. Split and tab
  • 4. Editing Files
  • 5. Spell check
  • 6. Plugins
  • diff --git a/tools/mutt.html b/tools/mutt.html index 276fb51..ef7cdbd 100644 --- a/tools/mutt.html +++ b/tools/mutt.html @@ -90,7 +90,7 @@

    Lets start configuring the two accounts, one for host system email and another for external email account. Change pgp_sign_as according to your specific sub key for signing. Change - muttrc with your + muttrc with your preferences;

    @@ -111,30 +111,24 @@
             set sort_aux=reverse-last-date-received
             set duplicate_threads=yes
     
    -        source ~/.mutt/gpg.rc
    -
    -        set pgp_autosign=yes
    -        set pgp_sign_as=0x1D327CA1
    -        set pgp_replyencrypt=yes
    -        set pgp_timeout=1800
    +        set crypt_use_gpgme=yes
     
    -        # automatically sign all outgoing messages
    -        set crypt_autosign
    +        ## automatically sign all outgoing messages
    +        set crypt_autosign=yes
     
    -        # sign only replies to signed messages
    -        set crypt_replysign
    +        ## automatically encrypt outgoing messages
    +        set crypt_autoencrypt=yes
     
    -        # automatically encrypt outgoing messages
    -        #set crypt_autoencrypt=yes
    -
    -        # encrypt only replies to signed messages
    -        set crypt_replyencrypt=yes
    +        ## automatically verify the sign of a message when opened
    +        set crypt_verify_sig=yes
     
    -        # encrypt and sign replies to encrypted messages
    -        set crypt_replysignencrypted=yes
    +        set pgp_sign_as=0x8BF422F79FC7C975BDF07828E88440BC35095A74
    +        #set pgp_sign_as=0x8BF422F7
    +        set pgp_timeout=1800
    +        set pgp_autosign=yes
    +        #set pgp_replyencrypt=yes
     
    -        # automatically verify the sign of a message when opened
    -        set crypt_verify_sig=yes
    +        source ~/.mutt/gpg.rc
     
             source "~/.mutt/mail_alias"
             set alias_file=~/.mutt/mail_alias
    @@ -144,37 +138,38 @@
             set message_cachedir =~/.mutt/cache/bodies
             set certificate_file =~/.mutt/certificates
     
    -        set timeout=10    # mutt 'presses' (like) a key for you
    -                          #(while you're idle) each x sec to trigger
    +        set timeout=10    # mutt 'presses' (like) a key for you 
    +                          #(while you're idle) each x sec to trigger 
                               #the thing below
             set mail_check=5  # mutt checks for new mails on every keystroke
                               # but not more often then once in 5 seconds
             set beep_new      # beep on new messages in the mailboxes
     
             ## Local system account
    -        folder-hook 'Mail' 'source ~/.mutt/system'
    +        folder-hook '.mail' 'source ~/.mutt/system'
     
             ## Remote account
    -        folder-hook 'MailExt' 'source ~/.mutt/external'
    +        folder-hook '.mailext' 'source ~/.mutt/external'
     
             ## Default account
    -        source "~/.mutt/system"
    +        source ~/.mutt/system
     
             ## Shortcuts
    +        macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.mutt/external<enter><change-folder>!<enter>'
    +
             macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.mutt/system<enter><change-folder>!<enter>'
    -        macro index,pager <f3> '<sync-mailbox><enter-command<>source ~/.mutt/external<enter><change-folder>!<enter>'
             
    -

    9.2.1. System Email

    +

    2.1. System Email

    -

    Content of .mutt/system;

    +

    Content of .mutt/system;

             color status green default
     
             set folder="~/.mail"
             set mbox_type=Maildir
    -        set spoolfile=/var/spool/mail/c1admin
    +        set spoolfile=/var/spool/mail/c9admin
             set keep_flagged=yes
     
             set mbox="~/.mail"           # ~/.mailext/read_inbox
    @@ -193,8 +188,8 @@
             unset pop_host
             unset smtp_url
     
    -        set realname='droid'
    -        set from=droid@c13
    +        set realname='c9admin'
    +        set from=c9admin@localhost
             

    Create folder;

    @@ -203,9 +198,9 @@ $ mkdir -p ~/.mail/{cur,new,tmp}
-

9.2.2. External Email

+

2.2. External Email

-

Edit .mutt/external;

+

Edit .mutt/external;

         color status blue default
@@ -242,7 +237,7 @@
         $ mkdir -p ~/.mailext/{cur,new,tmp}
         
-

9.3. Using Mutt

+

3. Using Mutt

When listing messages the status flag mean;

@@ -275,7 +270,7 @@

If you need to manually create a folder;

-

9.3.1. Tag Email

+

3.1. Tag Email

Just press shift-T and then read @@ -284,7 +279,7 @@ mark all taged for deletion.

-

9.3.2. Address alias

+

3.2. Address alias

Alias makes easy to manage email addresses. Add this to your muttrc;

@@ -296,7 +291,7 @@

While on index or page press "a" to add address to alias file.

-

9.3.3. GPG Keys

+

3.3. GPG Keys

Import a public key from email;

@@ -306,15 +301,12 @@

^K is CTRL+K

- Systools Index + Tools Index

This is part of the SysDoc Manual. Copyright (C) 2016 c9 team. See the file Gnu Free Documentation License for copying conditions.

- - - diff --git a/tools/scipts/iptables.sh b/tools/scipts/iptables.sh new file mode 100644 index 0000000..3215633 --- /dev/null +++ b/tools/scipts/iptables.sh @@ -0,0 +1,337 @@ +#!/bin/sh + +# +# XXXXXXXXXXXXXXXXX +# XXXX Network XXXX +# XXXXXXXXXXXXXXXXX +# + +# | +# v +# +-------------+ +------------------+ +# |table: filter| <---+ | table: nat | +# |chain: INPUT | | | chain: PREROUTING| +# +-----+-------+ | +--------+---------+ +# | | | +# v | v +# [local process] | **************** +--------------+ +# | +---------+ Routing decision +------> |table: filter | +# v **************** |chain: FORWARD| +# **************** +------+-------+ +# Routing decision | +# **************** | +# | | +# v **************** | +# +-------------+ +------> Routing decision <---------------+ +# |table: nat | | **************** +# |chain: OUTPUT| | + +# +-----+-------+ | | +# | | v +# v | +-------------------+ +# +--------------+ | | table: nat | +# |table: filter | +----+ | chain: POSTROUTING| +# |chain: OUTPUT | +--------+----------+ +# +--------------+ | +# v +# XXXXXXXXXXXXXXXXX +# XXXX Network XXXX +# XXXXXXXXXXXXXXXXX +# +# iptables [-t table] {-A|-C|-D} chain rule-specification +# +# iptables [-t table] {-A|-C|-D} chain rule-specification +# +# iptables [-t table] -I chain [rulenum] rule-specification +# +# iptables [-t table] -R chain rulenum rule-specification +# +# iptables [-t table] -D chain rulenum +# +# iptables [-t table] -S [chain [rulenum]] +# +# iptables [-t table] {-F|-L|-Z} [chain [rulenum]] [options...] +# +# iptables [-t table] -N chain +# +# iptables [-t table] -X [chain] +# +# iptables [-t table] -P chain target +# +# iptables [-t table] -E old-chain-name new-chain-name +# +# rule-specification = [matches...] [target] +# +# match = -m matchname [per-match-options] +# +# +# Targets +# +# can be a user defined chain +# +# ACCEPT - accepts the packet +# DROP - drop the packet on the floor +# QUEUE - packet will be stent to queue +# RETURN - stop traversing this chain and +# resume ate the next rule in the +# previeus (calling) chain. +# +# if packet reach the end of the chain or +# a target RETURN, default policy for that +# chain is applayed. +# +# Target Extensions +# +# AUDIT +# CHECKSUM +# CLASSIFY +# DNAT +# DSCP +# LOG +# Torn on kernel logging, will print some +# some information on all matching packets. +# Log data can be read with dmesg or syslogd. +# This is a non-terminating target and a rule +# should be created with matching criteria. +# +# --log-level level +# Level of logging (numeric or see sys- +# log.conf(5) +# +# --log-prefix prefix +# Prefix log messages with specified prefix +# up to 29 chars log +# +# --log-uid +# Log the userid of the process with gener- +# ated the packet +# NFLOG +# This target pass the packet to loaded logging +# backend to log the packet. One or more userspace +# processes may subscribe to the group to receive +# the packets. +# +# ULOG +# This target provides userspace logging of maching +# packets. One or more userspace processes may then +# then subscribe to various multicast groups and +# then receive the packets. +# +# +# Commands +# +# -A, --append chain rule-specification +# -C, --check chain rule-specification +# -D, --delete chain rule-specification +# -D, --delete chain rulenum +# -I, --insert chain [rulenum] rule-specification +# -R, --replace chain rulenum rule-specification +# -L, --list [chain] +# -P, --policy chain target +# +# Parameters +# +# -p, --protocol protocol +# tcp, udp, udplite, icmp, esp, ah, sctp, all +# -s, --source address[/mask][,...] +# -d, --destination address[/mask][,...] +# -j, --jump target +# -g, --goto chain +# -i, --in-interface name +# -o, --out-interface name +# -f, --fragment +# -m, --match options module-name +# iptables can use extended packet matching +# modules. +# -c, --set-counters packets bytes + +IPT="/usr/sbin/iptables" +SPAMLIST="blockedip" +SPAMDROPMSG="BLOCKED IP DROP" +PUB_IF="wlp7s0" +DHCP_SERV="192.168.1.254" +#PUB_IP="192.168.1.65" +#PRIV_IF="wlp3s0" + +modprobe ip_conntrack +modprobe ip_conntrack_ftp + +echo "Stopping ipv4 firewall and deny everyone..." + +iptables -F +iptables -X +iptables -t nat -F +iptables -t nat -X +iptables -t mangle -F +iptables -t mangle -X +iptables -t raw -F +iptables -t raw -X +iptables -t security -F +iptables -t security -X + + +echo "Starting ipv4 firewall filter table..." + +# Set Default Rules +iptables -P INPUT DROP +iptables -P FORWARD DROP +iptables -P OUTPUT DROP + +# Unlimited on local +$IPT -A INPUT -i lo -j ACCEPT +$IPT -A OUTPUT -o lo -j ACCEPT + +# Block sync +$IPT -A INPUT -p tcp ! --syn -m state --state NEW -m limit --limit 5/m --limit-burst 7 -j LOG --log-level 7 --log-prefix "iptables: drop sync: " +$IPT -A INPUT -p tcp ! --syn -m state --state NEW -j DROP + +# Block Fragments +$IPT -A INPUT -f -m limit --limit 5/m --limit-burst 7 -j LOG --log-level 4 --log-prefix "iptables: drop frag: " +$IPT -A INPUT -f -j DROP + +# Block bad stuff +$IPT -A INPUT -p tcp --tcp-flags ALL FIN,URG,PSH -j DROP +$IPT -A INPUT -p tcp --tcp-flags ALL ALL -j DROP + +$IPT -A INPUT -p tcp --tcp-flags ALL NONE -m limit --limit 5/m --limit-burst 7 -j LOG --log-level 4 --log-prefix "iptables: drop null: " +$IPT -A INPUT -p tcp --tcp-flags ALL NONE -j DROP # NULL packets + +$IPT -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -m limit --limit 5/m --limit-burst 7 -j LOG --log-level 4 --log-prefix "iptables: drop syn rst syn rst: " +$IPT -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j DROP + +$IPT -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -m limit --limit 5/m --limit-burst 7 -j LOG --log-level 4 --log-prefix "iptables: drop xmas: " +$IPT -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP #XMAS + +$IPT -A INPUT -p tcp --tcp-flags FIN,ACK FIN -m limit --limit 5/m --limit-burst 7 -j LOG --log-level 4 --log-prefix "iptables: drop fin scan: " +$IPT -A INPUT -p tcp --tcp-flags FIN,ACK FIN -j DROP # FIN packet scans + +$IPT -A INPUT -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j DROP + +##### Add your AP rules below ###### + +#echo 1 > /proc/sys/net/ipv4/ip_forward +#$IPT -t nat -A POSTROUTING -o ${PUB_IF} -j SNAT --to ${PUB_IP} +#$IPT -A FORWARD -i ${PRIV_IF} -o ${PUB_IF} -j ACCEPT +#$IPT -A FORWARD -i ${PUB_IF} -o ${PRIV_IF} -j ACCEPT + +#$IPT -A INPUT -i ${PRIV_IF} -j ACCEPT +#$IPT -A OUTPUT -o ${PRIV_IF} -j ACCEPT + +##### Server rules below ###### + +#echo "Allow ICMP" +#$IPT -A INPUT -i ${PUB_IF} -p icmp --icmp-type 0 -s 192.168.0.0/16 -j ACCEPT +#$IPT -A OUTPUT -o ${PUB_IF} -p icmp --icmp-type 0 -d 192.168.0.0/16 -j ACCEPT +#$IPT -A INPUT -i ${PUB_IF} -p icmp --icmp-type 8 -s 192.168.0.0/16 -j ACCEPT +#$IPT -A OUTPUT -o ${PUB_IF} -p icmp --icmp-type 8 -d 192.168.0.0/16 -j ACCEPT + +#echo "Allow DNS Server" +#$IPT -A INPUT -i ${PUB_IF} -p udp --sport 1024:65535 --dport 53 -m state --state NEW,ESTABLISHED -s 192.168.0.0/16 -j ACCEPT +#$IPT -A OUTPUT -o ${PUB_IF} -p udp --sport 53 --dport 1024:65535 -m state --state ESTABLISHED -d 192.168.0.0/16 -j ACCEPT + +#echo "Allow HTTP and HTTPS server" +#$IPT -A INPUT -i ${PUB_IF} -p tcp --dport 443 -m state --state NEW,ESTABLISHED -s 192.168.0.0/16 -j ACCEPT +#$IPT -A INPUT -i ${PUB_IF} -p tcp --dport 80 -m state --state NEW,ESTABLISHED -s 192.168.0.0/16 -j ACCEPT +#$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 80 -m state --state NEW,ESTABLISHED -s 192.168.0.0/16 -j ACCEPT +#$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 443 -m state --state NEW,ESTABLISHED -s 192.168.0.0/16 -j ACCEPT + +#echo "Allow ssh server" +#$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT +#$IPT -A INPUT -i ${PUB_IF} -p tcp --dport 22 -m state --state ESTABLISHED -j ACCEPT +#$IPT -A INPUT -i ${PUB_IF} -p tcp --dport 22 -m state --state NEW -m limit --limit 3/min --limit-burst 3 -j ACCEPT + +##### Add your rules below ###### + +echo "Allow DNS Client" + +#$IPT -A INPUT -i ${PUB_IF} -p udp --sport 53 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT +#$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 53 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT +#$IPT -A OUTPUT -o ${PUB_IF} -p udp --sport 1024:65535 --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT +#$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 1024:65535 --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT + +echo "Allow Whois Client" + +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 43 -m state --state ESTABLISHED -j ACCEPT +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 1024:65535 --dport 43 -m state --state NEW,ESTABLISHED -j ACCEPT + +echo "Allow HTTP Client" + +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 80 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 1024:65535 --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT + +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 443 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT +$IPT -A INPUT -i ${PUB_IF} -p udp --sport 443 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 1024:65535 --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT +$IPT -A OUTPUT -o ${PUB_IF} -p udp --sport 1024:65535 --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT + + +echo "Allow Rsync Client" +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 873 -m state --state NEW,ESTABLISHED -j ACCEPT +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 873 -m state --state ESTABLISHED -j ACCEPT + +echo "Allow POP3S Client" +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 995 -m state --state NEW,ESTABLISHED -j ACCEPT +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 995 -m state --state ESTABLISHED -j ACCEPT + +echo "Allow SMTPS Client" +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 465 -m state --state NEW,ESTABLISHED -j ACCEPT +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 465 -m state --state ESTABLISHED -j ACCEPT + +echo "Allow NTP Client" +$IPT -A OUTPUT -o ${PUB_IF} -p udp --dport 123 -m state --state NEW,ESTABLISHED -j ACCEPT +$IPT -A INPUT -i ${PUB_IF} -p udp --sport 123 -m state --state ESTABLISHED -j ACCEPT + +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 21 -m state --state ESTABLISHED -j ACCEPT +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 21 -m state --state NEW,ESTABLISHED -j ACCEPT + +echo "Allow IRC Client" +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 1024:65535 --dport 6667 -m state --state NEW -j ACCEPT + +echo "Allow Active FTP Client" +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 20 -m state --state ESTABLISHED -j ACCEPT +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 20 -m state --state NEW,ESTABLISHED -j ACCEPT + +echo "Allow Git" +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 9418 -m state --state NEW -j ACCEPT + +echo "Allow ssh client" +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT + +#echo "Allow Passive Connections" +$IPT -A INPUT -i ${PUB_IF} -p tcp --sport 1024:65535 --dport 1024: -m state --state ESTABLISHED,RELATED -j ACCEPT +$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 1024:65535 --dport 1024: -m state --state ESTABLISHED,RELATED -j ACCEPT + + +# echo "Allow FairCoin" +# $IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 46392 -m state --state NEW,ESTABLISHED -j ACCEPT +# $IPT -A INPUT -i ${PUB_IF} -p tcp --sport 46392 -m state --state ESTABLISHED -j ACCEPT +# +# echo "Allow Dashcoin" +# $IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 29080 -m state --state NEW,ESTABLISHED -j ACCEPT +# $IPT -A INPUT -i ${PUB_IF} -p tcp --sport 29080 -m state --state ESTABLISHED -j ACCEPT +# +# echo "Allow warzone2100" +# $IPT -A INPUT -i ${PUB_IF} -p tcp --dport 2100 -s 192.168.0.0/16 -j ACCEPT +# $IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 2100 -j ACCEPT +# $IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 2100 -j ACCEPT +# $IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 9990 -j ACCEPT +# +# echo "Allow wesnoth" +# $IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 15000 -m state --state NEW -j ACCEPT +# $IPT -A OUTPUT -o ${PUB_IF} -p tcp --dport 14998 -m state --state NEW -j ACCEPT + +##### END your rules ############ +# Less log of known traffic + +# RIP protocol +$IPT -A INPUT -i ${PUB_IF} -p udp --sport 520 --dport 520 -s 192.168.0.0/16 -j DROP + +# DHCP +$IPT -A OUTPUT -o ${PUB_IF} -p udp --sport 68 --dport 67 -d $DHCP_SERV -j ACCEPT +$IPT -A INPUT -i ${PUB_IF} -p udp --sport 68 --dport 67 -s $DHCP_SERV -j ACCEPT + +# log everything else and drop +$IPT -A INPUT -j LOG --log-level 7 --log-prefix "iptables: INPUT: " +$IPT -A OUTPUT -j LOG --log-level 7 --log-prefix "iptables: OUTPUT: " +$IPT -A FORWARD -j LOG --log-level 7 --log-prefix "iptables: FORWARD: " + +exit 0 diff --git a/tools/vim.html b/tools/vim.html index 03ba767..d483e29 100644 --- a/tools/vim.html +++ b/tools/vim.html @@ -46,7 +46,20 @@

5.3. Split and tab

-

:sp

+

Horizontal split;

+
+        :sp
+        
+ +

Vertical split;

+
+        :sp
+        
+ +

Move between window splits;

+
+        ctrl+w (k,j,l,h)
+        

5.4. Editing files

-- cgit