From 30574da1d494e74a0648152381dad871934fbb68 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Thu, 22 Sep 2016 02:20:32 +0100 Subject: tools gnupg document fix --- tools/gnupg.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/gnupg.html b/tools/gnupg.html index 53ca088..21aedcb 100644 --- a/tools/gnupg.html +++ b/tools/gnupg.html @@ -124,17 +124,19 @@ $ gpg --edit-key UID -

3.1 Edit key

+

3.1. Edit key

         $ gpg --edit-key KEYID
         adduid
         
+

3.2. Revoke key

Follow the instructions and then select the user you want to revoque, where N is the UID of the user;

+        $ gpg --edit-key KEYID
         uid N
         revuid
         save
@@ -161,7 +163,7 @@
         $ gpg --armor --output user.asc --export 'User Name'
         
-

3.2. Export to keyserver

+

4.2. Export to keyserver

The primary public key's ID is referenced in the pub line after the key size, for example the key created above, @@ -213,7 +215,6 @@ gpg --list-keys justin -

5. Encrypt, decrypt and signing

5.1. Encrypt file

-- cgit From 1b941827ad765bd252e4a27a460dc485c872991c Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Thu, 22 Sep 2016 03:22:37 +0100 Subject: tools tar document fix --- tools/tar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/tar.html b/tools/tar.html index 5bd3df6..d5883e6 100644 --- a/tools/tar.html +++ b/tools/tar.html @@ -12,7 +12,7 @@

1. Create Backup

-

Script in core/scripts/backup-system.sh use tldp +

Script core/scripts/backup-system.sh use tldp server backup and restore as a reference.

-- cgit From 46097662f5988504cf86a1f6fd75c2cca88c0fb3 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Thu, 22 Sep 2016 03:36:48 +0100 Subject: tools qemu and index document fix --- tools/index.html | 6 +++--- tools/qemu.html | 19 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'tools') diff --git a/tools/index.html b/tools/index.html index e5adac6..c30c85e 100644 --- a/tools/index.html +++ b/tools/index.html @@ -78,9 +78,9 @@
  • Qemu
  • diff --git a/tools/qemu.html b/tools/qemu.html index ef1c36d..68850e7 100644 --- a/tools/qemu.html +++ b/tools/qemu.html @@ -10,31 +10,29 @@

    Qemu

    -

    Kernel configuration

    +

    1. Host System

             # usermod -a -G kvm c9admin
             # usermod -a -G kvm username
             
    -

    Disk images

    +

    2. Disk images

    img
    -
    network slirp
    +
    Raw disk image, allows dd to a physical device.
    raw
    -
    network tap
    +
    Raw disk image, allows dd to a physical device.
    qcow2
    -
    ... ...
    +
    Qcow disk image file used by qemu.
    - -

    Create hard disk image, there is different types, this describes how to create a qcow2 type;

    -        $ qemu-img create -f qcow2 crux-img.qcow2 20G
    +        $ qemu-img create -f qcow2 crux-img.qcow2 15G
             

    You can mount disk image;

    @@ -68,6 +66,7 @@ # kpartx -a -s -l /dev/nbd0 +

    2. Network

    Network configuration;

    @@ -79,9 +78,8 @@
    ... ...
    -

    Network configuration

    -

    Tap interfaces

    +

    2.1. Tap interfaces

             KERNEL=="tun", GROUP="kvm", MODE="0660", OPTIONS+="static_node=net/tun"
    @@ -137,6 +135,7 @@
     	
     	# tcpdump tap0
     	
    + Tools Index

    This is part of the c9 Manual. Copyright (C) 2016 -- cgit From 1ee2bc2e2945df1a44a57205c8043a52009850c5 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Thu, 22 Sep 2016 05:24:41 +0100 Subject: tar backup script fix --- core/scripts/backup-system.sh | 6 ++++-- tools/tar.html | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/core/scripts/backup-system.sh b/core/scripts/backup-system.sh index 3fa1ab2..bc94f7e 100644 --- a/core/scripts/backup-system.sh +++ b/core/scripts/backup-system.sh @@ -14,9 +14,11 @@ echo $ROOT_DIR tar --xattrs -zcpf $DEST_DIR/$BCK_NAME-`date '+%Y-%j-%H-%M-%S'`.tar.gz \ --directory=$ROOT_DIR \ - --exclude=var/ports \ - --exclude=var/run \ + --exclude=usr/ports \ --exclude=usr/src \ + --exclude=var/run \ + --exclude=var/lock \ + --exclude=srv \ --exclude=mnt \ --exclude=home \ --exclude=dev \ diff --git a/tools/tar.html b/tools/tar.html index d5883e6..c3b7cac 100644 --- a/tools/tar.html +++ b/tools/tar.html @@ -34,10 +34,11 @@ tar --xattrs -zcpf $DEST_DIR/$BCK_NAME-`date '+%Y-%j-%H-%M-%S'`.tar.gz \ --directory=$ROOT_DIR \ - --exclude=srv \ - --exclude=var/ports \ - --exclude=var/run \ + --exclude=usr/ports \ --exclude=usr/src \ + --exclude=var/run \ + --exclude=var/lock \ + --exclude=srv \ --exclude=mnt \ --exclude=home \ --exclude=dev \ -- cgit From 2e952e8ae40eaf147b6cba822411db93a8ee9190 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Fri, 23 Sep 2016 05:38:00 +0100 Subject: Final revision 0.2.2 --- core/install.html | 4 ++- host.html | 2 +- manifesto.html | 19 ++++++++++++- tools/index.html | 34 +++++++++++------------ tools/qemu.html | 83 ++++++++++++++++++++++++++++++++++++------------------- 5 files changed, 92 insertions(+), 50 deletions(-) (limited to 'tools') diff --git a/core/install.html b/core/install.html index f956cf4..194e245 100644 --- a/core/install.html +++ b/core/install.html @@ -34,7 +34,9 @@

    Prepare disk or target location where new system will be installed. Follow steps describe how to create efi and separate partitions such as; boot, root, var, tmp, - usr, ports, swap and home.

    + usr, ports, swap and home. Information about + gpt partition table. +

    /boot/efi

    diff --git a/host.html b/host.html index 9a2ca1c..01aaf4f 100644 --- a/host.html +++ b/host.html @@ -60,7 +60,7 @@
    Hostname
    Exim certificates
    Dnsmasq
    -
    Exim certificates
    +
    GPG certificates
    DNS
    Dns encryption
    diff --git a/manifesto.html b/manifesto.html index 5d8963e..abf5635 100644 --- a/manifesto.html +++ b/manifesto.html @@ -11,7 +11,24 @@

    c9 Manifesto

    There is no c9 manifesto but a collection of manifestos found on the - Internet that share same vision. Hope you share the same vision.

    + Internet that share same vision.

    + +

    Making The Network Work

    + +

    From + Sternececk.net;

    + +
    +         Every citizen, regardless of their economic circumstances,
    +         should be able to share the benefits of the Information Age -
    +         including better communications, greater participation,
    +         electronic life long learning, and e-commerce.
    +         To achieve this they should have access to local community
    +         technology centres, plus public online forums and services
    +         to create an online community. The centres will provide
    +         technical support and help 'on the ground', the forums will
    +         be 'virtual spaces' for online communities related to localities.
    +         

    Guerilla Open Access Manifesto

    diff --git a/tools/index.html b/tools/index.html index c30c85e..b721f73 100644 --- a/tools/index.html +++ b/tools/index.html @@ -76,14 +76,6 @@
  • Nmap
  • -
  • Qemu - -
  • -
  • Storage -
  • +
  • Logrotate
  • +
  • Logwatch + +
  • -
  • Logrotate
  • -
  • - Logwatch -
  • -
  • - Fail2Ban +
  • Fail2Ban @@ -119,6 +109,14 @@

    Network Services

      +
    • Qemu + +
    • OpenSSH
        diff --git a/tools/qemu.html b/tools/qemu.html index 68850e7..ce1b66d 100644 --- a/tools/qemu.html +++ b/tools/qemu.html @@ -12,6 +12,14 @@

        1. Host System

        +

        Load modules, in this case kvm of intel cpu;

        + +
        +        # modprobe -a kvm-intel tun virtio
        +        
        + +

        Add users to kvm group;

        +
                 # usermod -a -G kvm c9admin
                 # usermod -a -G kvm username
        @@ -42,40 +50,51 @@
                 $ sudo qemu-nbd -c /dev/nbd0 /crux-img.qcow2
                 
        -

        To disconnect image disk (ndb); +

        To disconnect image disk (ndb);

                 $ sudo qemu-nbd -d /dev/nbd0
                 
        -

        You can use image as a normal disk, example how +

        Information about preparing + partitions + and storage administration. + You can use image as a normal disk, example how to use parted to create a gpt system table;

                 # parted /dev/nbd0
                 (parted) mklabel gpt
        +        (parted) mkpart ext4 0% 100%
        +        (parted) set 1 boot on
                 
        -

        More information about - gpt partition table. -

        +
        +        # kpartx -a -s -l -u /dev/nbd0
        +        
        -

        If partitions are on qcow2 image then setup partitions;

        +
        +        # mkfs.ext4 /dev/mapper/nbd0p1
        +        
        + +

        Mount partition;

        -        # kpartx -a -s -l /dev/nbd0
        +        # mount /dev/mapper/nbd0p1
                 

        2. Network

        Network configuration;

        +
        slirp
        -
        network slirp
        +
        Default virtual NAT'd network.
        tun/tap
        -
        network tap
        -
        ...
        -
        ... ...
        +
        Good performance to create virtually any type of network + topology.
        +
        vde
        +
        The VDE networking backend.
        @@ -90,7 +109,7 @@ you can set only user or group;

        -        # tunctl -u username -g kvm
        +        # tunctl -u username -g kvm -t tap0
                 

        Set permissions to existing tap interface;

        @@ -102,12 +121,24 @@

        Manual creation of tap interface;

        -
        -	# ip tuntap add name tap0 mode tap
        +        
        +        # ip tuntap add name tap0 mode tap
                 # chmod 0666 /dev/tap0
                 # chown root:username /dev/tap0
        -	# ip link show
        -	
        +
        + +
        +        # ip addr add 10.0.2.1/24 dev tap0
        +        # ip link set dev tap0 up
        +        # ip link show
        +        
        + +
        +        # sysctl -w net.ipv4.ip_forward=1
        +        # iptables -t nat -A POSTROUTING -s 10.0.2.0/24 -o eth0 -j MASQUERADE
        +        
        + +

        Guest System

        Start qemu with 512 of ram, mydisk.img as disk and boot from iso

        @@ -117,25 +148,19 @@ -m 512 \ -boot d -cdrom image.iso \ -hda mydisk.img -
  • +

    Start qemu with 1024 of ram, network configured using tap0 interface device no host and boot from crux.qcow2;

    -
    -	$ qemu-system-x86_64 \
    -	-enable-kvm \
    -	-m 1024 \
    -	-hda c9/local/crux.qcow2 \
    -	-net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no
    +        
    +        $ qemu-system-x86_64 \
    +        -enable-kvm \
    +        -m 1024 \
    +        -hda c9/local/crux.qcow2 \
    +        -net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no
             
    -

    On host machine test network;

    - -
    -	# tcpdump tap0
    -	
    - Tools Index

    This is part of the c9 Manual. Copyright (C) 2016 -- cgit