unrar or unar – go open source way

2014-05-15 1 min read Fedora

Recently there was a utility released called unar, a open source replacement for unar.

Description::

The command-line utilities lsar and unar are capable of listing and extracting
files respectively in several formats including RARv3. unar can serve as a free
and open source replacement of unrar.

To install on fedora:

yum install unar

The utility provides 2 commands called lsar and unar, which can be used to list and extract rar archives.

Continue reading

Sandbox apache (httpd) for better security.

2014-03-26 1 min read Fedora

Apache/httpd is something which you would like to have contained. And now fedora provides a native way/mechanism to to so with virt-sandbox-service. With this, you can create a virtualized sanbox service and then connect/list/manage such with virsh.

We will be using LXC.

Basically its couple of commands and you have a contained service running.

# List all the containers
virsh -c lxc:/// list

# Create the sandbox, all default parameters. Will take dhcp address.
virt-sandbox-service create -C  --username amitag -u httpd.service httpd_conta

# Create the container with static IP.
virt-sandbox-service create -C  --username amitag -u httpd.service -N \
address=192.168.122.11/24%192.168.122.255  httpd_conta#Enable and start the service.
virt-sandbox-service start httpd_conta
virt-sandbox-service enable httpd_conta#Delete the container if not required any more.
virt-sandbox-service delete  httpd_conta

 

Continue reading

Sandbox Firefox – First step to security

2014-03-19 2 min read Fedora Firefox

First we will setup cgroup to limit cpu and memory usage, so here we go:

Add the configuration in /etc/cgconfig.conf

#------start cgconfig----------------
#new group
group firefox {
    perm {
        task {
#user your login id and group here, so that you can control this group
        uid = amitag;
        gid = amitag;
        }
        admin {
# same as above, set to your login id and group.
           uid = amitag;
           gid = amitag;
        }
    }
# set the limits for cpu.. by default there are 1024 shares of cpu with no other groups,
# so share of 102 would be around 10% .
    cpu{
        cpu.shares="102";
    }
# limit the cpus to be used to only 0-1
    cpuset{
        cpuset.cpus=0-1;
        cpuset.mems=0;
    }
# limit the maximum memory to 700Mb.
    memory {
        memory.limit_in_bytes="700M";
        memory.max_usage_in_bytes="0";
    }
}
#------end cgconfig----------------

 

Continue reading

pkgwat -search packages for Fedora.

2013-08-23 1 min read Fedora

pkgwat is a nice utility to search the fedora packages websearch.

Description : Pronounced "package WAT", pkgwat is a fast CLI tool for querying
: the fedora packages webapp.
: https://apps.fedoraproject.org/packages/
:
: You can make its search even better by helping us tag packages.
: https://apps.fedoraproject.org/tagger

And to search for  a package, you can use ::

pkgwat search 
pkgwat -h # get help on package.

 

Continue reading
Older posts Newer posts