I was doing a bit of research and came across this today.
Apt-Cacher is a method by which you can centrally cache and share packages already stored within your network. It also allows the option of caching any downloaded packages in the future. This allows me to download a package once and transparently share it with an unlimited number of machines within my network. This way I only use my Lanwidth (LAN-bandwidth), and not my limited WAN connection."
Setup would be:
---------------code---------------------------------------------
# aptitude install apt-cacher
To have auto startup
---------------code---------------------------------------------
# sed -i.orig 's/AUTOSTART=0/AUTOSTART=1/' /etc/default/apt-cacher
# /etc/init.d/apt-cacher restart
---------------code---------------------------------------------
Configure the acl for access (default is allow access to any IP)
it is located in /etc/apt-cacher/apt-cacher.conf.
To import the packages in your box to the cache
---------------code---------------------------------------------
# /usr/share/apt-cacher/apt-cacher-import.pl -s /var/cache/apt/archives/
---------------code---------------------------------------------
To give other machines on the network access to the cache edit the apt-conf file in /etc/apt to reflect the machines IP address:
---------------code---------------------------------------------
Acquire:http:"http:localhost.localdomain:port"
---------------code---------------------------------------------
Probably a bit late to the party, but I will attempt to share things of interest to me (that are over the 140 character twitter limit) via this space.
Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts
Saturday, January 2, 2010
Friday, January 1, 2010
Installing gnome-do in BT4
If you have not heard of gnome-do it is basically a launcher. But it can do alot more.
Warning: Adding Repos or PPA's that are outside of the control of Remote-Exploit may cause problems, as such me( and the remote-exploit team)are not responsible. I may be able to help but then again I may not. Gnome-do is very new and as such all of the issues (bugs) have not been worked out.
Ok to install Gnome-do you will need to add the PPA's to your repos list using your favorite text editor.
---------------code---------------------------------------------
root@dorkbox:# nano /etc/apt/sources.list
---------------code---------------------------------------------
Add the following two lines.
---------------code---------------------------------------------
deb http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main
---------------code---------------------------------------------
The key should be added to your keyring as well.
---------------code---------------------------------------------
root@dorkbox:# gpg --no-default-keyring --keyring /tmp/gnome-do.keyring --keyserver keyserver.ubuntu.com --recv
A5D19FDCAA6ABB440CD3464628A8205077558DD0
root@dorkbox:# gpg --no-default-keyring --keyring /tmp/gnome-do.keyring --export --armor
A5D19FDCAA6ABB440CD3464628A8205077558DD0 | apt-key add -
root@dorkbox:# rm /tmp/gnome-do.keyring
---------------code---------------------------------------------
Then
---------------code---------------------------------------------
root@dorkbox:# apt-get install gnome-do
---------------code---------------------------------------------
Gnome-do will add some packages that it needs in order to run. We will need to add a compositing manager we will come back to this later. Next add the gnome terminal, this is used to take advantage of any application that will run from a terminal (i.e. Back Track tools)
So to get it:
---------------code---------------------------------------------
root@dorkbox:# apt-get install gnome-terminal
---------------code---------------------------------------------
Once apt finishes we need to set gnome-terminal as the default terminal emulator (Do not worry you can change this later if you need to.) In order to change it
---------------code---------------------------------------------
root@dorkbox:# update-alternatives –-config x-terminal-emulator
---------------code---------------------------------------------
You will then see the following.
---------------code---------------------------------------------
Selection Alternative
———————————————–
1 /usr/bin/xterm
2 /usr/bin/uxterm
3 /usr/bin/koi8rxterm
4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
6 /usr/bin/konsole
7 /usr/bin/xfce4-terminal.wrapper
Press enter to keep the default[*], or type selection number:
---------------code---------------------------------------------
Before you type a number make note of your default in case you need to change back later on. Ok you can find gnome-do in the menu under Utilities. An easy way to work with it is to pull it to the desktop or panel to make a short-cut.
Now click on it and it should open a window on the desktop in the upper right hand corner should be a little drop down arrow. Click it to bring up the preferences dialog. Under plugins look for gnome-terminal and check it and then refresh and close it.
You can mess with the other preferences on your own. Ok now that you have everything setup click on the purple gnome-do icon or use the "super key" plus the space bar. Superkey may also be a windows key. This should bring up the basic gnome-do sceen. From there you can start typing commands or the names of applications. Try typing msfconsole. It should then give you options after a few letters. If you find run then tab over to the other side of the screen and hit enter. It should start the msfconsole running.
If you tab to the second half of the screen and use the up down arrow keys to cycle through the other options. There should be a copy to clipboard as well as a few others. If a command does not work then re-type it and look for the "run in terminal" command. Another feature of Gnome-do is that of Docky. Docky is basically a front-end of Gnome-do and it allows you to create a launcher panel on your desktop. Using Docky you can drag and drop items onto the panel or drag off of the panel to delete.
There is a lot you can do with both Gnome-do and Docky I will leave it up to you to explore it. If you don't have a Compositing Manager then you will need one to take advantage of all the cool features. Now if you run the "classic" mode of Gnome-do then you won't need one.The easiest way to do this would be to add xcompmgr. There are other managers but xcompmgr is light on resources in the background. In order to set it up use aptitude to grab it.
---------------code---------------------------------------------
root@dorkbox:#aptitude install xcompmgr
---------------code---------------------------------------------
Of course this will also pull other dependecies along. You can then start compositing manually via the ‘xcompmgr‘ command. With basic compositing enabled you should now be able to use the enhanced features of Gnome-Do, including the Mini Interface, Docky, Glass Interface and Nouveau. So now that you have everything needed start xcompmgr using the command above, then open the preferences for gnome-do again and this time go to the appearance tab and select docky. Now you should see the launcher panel at the bottom. If it does not show up then you may need to change the appearance themes a couple of times. Now go into your menu and find yourself a few tools that you would want to add to docky and drag them over. Some of the icons may show as up as an "X" I have not found a fix for this yet.
That's it. Again remember that gnome-do is new software and as such things may not work right. But with a little fun you can now launch your applications in a new way.
I encourage everyone who tries this to add their tips and tricks to this thread.
Warning: Adding Repos or PPA's that are outside of the control of Remote-Exploit may cause problems, as such me( and the remote-exploit team)are not responsible. I may be able to help but then again I may not. Gnome-do is very new and as such all of the issues (bugs) have not been worked out.
Ok to install Gnome-do you will need to add the PPA's to your repos list using your favorite text editor.
---------------code---------------------------------------------
root@dorkbox:# nano /etc/apt/sources.list
---------------code---------------------------------------------
Add the following two lines.
---------------code---------------------------------------------
deb http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main
---------------code---------------------------------------------
The key should be added to your keyring as well.
---------------code---------------------------------------------
root@dorkbox:# gpg --no-default-keyring --keyring /tmp/gnome-do.keyring --keyserver keyserver.ubuntu.com --recv
A5D19FDCAA6ABB440CD3464628A8205077558DD0
root@dorkbox:# gpg --no-default-keyring --keyring /tmp/gnome-do.keyring --export --armor
A5D19FDCAA6ABB440CD3464628A8205077558DD0 | apt-key add -
root@dorkbox:# rm /tmp/gnome-do.keyring
---------------code---------------------------------------------
Then
---------------code---------------------------------------------
root@dorkbox:# apt-get install gnome-do
---------------code---------------------------------------------
Gnome-do will add some packages that it needs in order to run. We will need to add a compositing manager we will come back to this later. Next add the gnome terminal, this is used to take advantage of any application that will run from a terminal (i.e. Back Track tools)
So to get it:
---------------code---------------------------------------------
root@dorkbox:# apt-get install gnome-terminal
---------------code---------------------------------------------
Once apt finishes we need to set gnome-terminal as the default terminal emulator (Do not worry you can change this later if you need to.) In order to change it
---------------code---------------------------------------------
root@dorkbox:# update-alternatives –-config x-terminal-emulator
---------------code---------------------------------------------
You will then see the following.
---------------code---------------------------------------------
Selection Alternative
———————————————–
1 /usr/bin/xterm
2 /usr/bin/uxterm
3 /usr/bin/koi8rxterm
4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
6 /usr/bin/konsole
7 /usr/bin/xfce4-terminal.wrapper
Press enter to keep the default[*], or type selection number:
---------------code---------------------------------------------
Before you type a number make note of your default in case you need to change back later on. Ok you can find gnome-do in the menu under Utilities. An easy way to work with it is to pull it to the desktop or panel to make a short-cut.
![]() |
| From Gnome-Do |
![]() |
| From Gnome-Do |
![]() |
| From Gnome-Do |
![]() |
| From Gnome-Do |
---------------code---------------------------------------------
root@dorkbox:#aptitude install xcompmgr
---------------code---------------------------------------------
Of course this will also pull other dependecies along. You can then start compositing manually via the ‘xcompmgr‘ command. With basic compositing enabled you should now be able to use the enhanced features of Gnome-Do, including the Mini Interface, Docky, Glass Interface and Nouveau. So now that you have everything needed start xcompmgr using the command above, then open the preferences for gnome-do again and this time go to the appearance tab and select docky. Now you should see the launcher panel at the bottom. If it does not show up then you may need to change the appearance themes a couple of times. Now go into your menu and find yourself a few tools that you would want to add to docky and drag them over. Some of the icons may show as up as an "X" I have not found a fix for this yet.
That's it. Again remember that gnome-do is new software and as such things may not work right. But with a little fun you can now launch your applications in a new way.
I encourage everyone who tries this to add their tips and tricks to this thread.
Change the Default Terminal Emulator
Changing the default Terminal Emulator or tty is something that is easy to do, but most people never need to. One of the reasons that you may need to change the terminal is because some programs may not work with your systems default.
So in order to do this on Debian based systems open a shell and use the update-alternatives command.
root@dorkbox:# update-alternatives –-config x-terminal-emulator
This will return the following:
There are 7 alternatives which provide `x-terminal-emulator’.
Selection Alternative
———————————————–
1 /usr/bin/xterm
2 /usr/bin/uxterm
3 /usr/bin/koi8rxterm
4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
6 /usr/bin/konsole
7 /usr/bin/xfce4-terminal.wrapper
Press enter to keep the default[*], or type selection number:
So as you can see the * represents the current default terminal and entering a number from the list above will change to the one you want.
Make a note of your current one so that you can change back if you later need to.
Well that's it. Not hard to do.
So in order to do this on Debian based systems open a shell and use the update-alternatives command.
root@dorkbox:# update-alternatives –-config x-terminal-emulator
This will return the following:
There are 7 alternatives which provide `x-terminal-emulator’.
Selection Alternative
———————————————–
1 /usr/bin/xterm
2 /usr/bin/uxterm
3 /usr/bin/koi8rxterm
4 /usr/bin/lxterm
*+ 5 /usr/bin/gnome-terminal.wrapper
6 /usr/bin/konsole
7 /usr/bin/xfce4-terminal.wrapper
Press enter to keep the default[*], or type selection number:
So as you can see the * represents the current default terminal and entering a number from the list above will change to the one you want.
Make a note of your current one so that you can change back if you later need to.
Well that's it. Not hard to do.
Monday, April 6, 2009
UFW Howto in BT4
This is a small howto for UFW the uncomplicated firewall for BT4
The majority of this info comes from the man page.
There are other tutorials on the net for using this.
There is also a gui we will talk about it a bit latter.
First and foremost if you have something to add please do so.
ufw is a front end for iptables.
So in order for us to start ufw go to the command line
Code:
root@bt:~# ufw
Usage: ufw COMMAND
Commands:
enable enables the firewall
disable disables the firewall
default ARG set default policy to ALLOW or DENY
logging ARG set logging to ON or OFF
allow|deny RULE allow or deny RULE
delete allow|deny RULE delete the allow/deny RULE
status show firewall status
version display version information
Application profile commands:
app list list application profiles
app info PROFILE show information on PROFILE
app update PROFILE update PROFILE
app default ARG set profile policy to ALLOW, DENY or SKIP
root@bt:~#
So lets look at some of the usage flags.
enable/disable are self explanatory.
Code:
# ufw enable
we get back
Code:
root@bt:~# ufw enable
Firewall started and enabled on system startup
root@bt:~#
Of course we would then have to reboot. When you do it will show up as enabled in the boot sequence. If it checks out you get the [OK].
Now lets look at default and ALLOW DENY
allow will as it states allow all defaults to take place which right now means that our
firewall really does nothing. deny will stop all incoming and forwarded packets but
it will not stop outgoing packets. So at the minimum this is better than nothing.
Here is what it looks like
Code:
root@bt:~# ufw default deny
Default policy changed to ‘deny’
(be sure to update your rules accordingly)
root@bt:~#
The same reminder is given every time. We will look at rules in a bit, first lets look at logging you can either turn it on or off.
Code:
#ufw logging on
logging enabled
The logs are stored at /var/log/messages or/kern.log and /syslog there is not a seperate log for ufw as of yet.
You can gather information from them by using grep
Code:
#grep ufw /var/log/syslog
Now let’s look at the rules. There are again two options allow/deny rule.
So here is where it can get a bit more complicated, complex. This is how we add certain ports and protocols.
Code:
# ufw allow 80
rule updated
So now port 80 http is open. Close it again with
Code:
# ufw deny 80
Now with just the port it will allow or deny traffic from both tcp and udp.
Now we can specify with the protocol like the following 80/tcp
We can also delete a rule and it will revert to whatever the default policy had at the beginning.
More complicated rules can be made as well. For instance we want to blacklist certain IP address we can by supplying the
address to the rule set.
Code:
# ufw allow from 192.168.1.100
You can also specify certain protocols with certain IP’s like so:
Code:
#ufw allow from 192.168.1.1 to any port 22
This will allow 192.168.1.1 to access port 22 on both tcp and udp.
If you want to allow only tcp append it to the end of the port 22/tcp
You can also use a netmask. Next let’s look at services. You can set services that can be found in
Code:
#cat /etc/services
For instance we want to allow telnet then we simply give
Code:
# ufw allow telnet
That simple.
Probably the best usage flag in ufw is the –dry-run which will not make any real changes but only show what would occur with the new rule in place.
We can also delete a rule and it will revert to whatever the default policy had at the beginning. More complicated rules can be made as well. For instance we want to blacklist certain IP address we can by supplying the
address to the rule set.
Code:
# ufw allow from 192.168.1.100
You can also specify certain protocols with certain IP’s like so:
Code:
#ufw allow from 192.168.1.1 to any port 22
This will allow 192.168.1.1 to access port 22 on both tcp and udp.
If you want to allow only tcp append it to the end of the port 22/tcp
You can also use a netmask. Next let’s look at services. You can set services that can be found in
Code:
#cat /etc/services
For instance we want to allow telnet then we simply give
Code:
# ufw allow telnet
That simple.
One caveat though is that the service must be installed on the host.
Probably the best usage flag in ufw is the –dry-run which will not make any real changes but only show what would occur with the new rule in place.
So for example
Code:
#ufw --dry-run deny ssh
If the rule will not work or the syntax is wrong it will spit back an error.
Also when adding rules the first match wins according to the man page.
So make your specific rules first then the general ones.
There are more to the rules as well as support for applications themselves.
Next thing we can look at is adding the gui interface, if needed.
The link is here, this download is a ".deb" package, you can install it using
Code:
#dpkg -i gufw_0.0.7c-all.deb
There are more things that can be done and if anyone needs help with it make a post here about it.
The majority of this info comes from the man page.
There are other tutorials on the net for using this.
There is also a gui we will talk about it a bit latter.
First and foremost if you have something to add please do so.
ufw is a front end for iptables.
So in order for us to start ufw go to the command line
Code:
root@bt:~# ufw
Usage: ufw COMMAND
Commands:
enable enables the firewall
disable disables the firewall
default ARG set default policy to ALLOW or DENY
logging ARG set logging to ON or OFF
allow|deny RULE allow or deny RULE
delete allow|deny RULE delete the allow/deny RULE
status show firewall status
version display version information
Application profile commands:
app list list application profiles
app info PROFILE show information on PROFILE
app update PROFILE update PROFILE
app default ARG set profile policy to ALLOW, DENY or SKIP
root@bt:~#
So lets look at some of the usage flags.
enable/disable are self explanatory.
Code:
# ufw enable
we get back
Code:
root@bt:~# ufw enable
Firewall started and enabled on system startup
root@bt:~#
Of course we would then have to reboot. When you do it will show up as enabled in the boot sequence. If it checks out you get the [OK].
Now lets look at default and ALLOW DENY
allow will as it states allow all defaults to take place which right now means that our
firewall really does nothing. deny will stop all incoming and forwarded packets but
it will not stop outgoing packets. So at the minimum this is better than nothing.
Here is what it looks like
Code:
root@bt:~# ufw default deny
Default policy changed to ‘deny’
(be sure to update your rules accordingly)
root@bt:~#
The same reminder is given every time. We will look at rules in a bit, first lets look at logging you can either turn it on or off.
Code:
#ufw logging on
logging enabled
The logs are stored at /var/log/messages or/kern.log and /syslog there is not a seperate log for ufw as of yet.
You can gather information from them by using grep
Code:
#grep ufw /var/log/syslog
Now let’s look at the rules. There are again two options allow/deny rule.
So here is where it can get a bit more complicated, complex. This is how we add certain ports and protocols.
Code:
# ufw allow 80
rule updated
So now port 80 http is open. Close it again with
Code:
# ufw deny 80
Now with just the port it will allow or deny traffic from both tcp and udp.
Now we can specify with the protocol like the following 80/tcp
We can also delete a rule and it will revert to whatever the default policy had at the beginning.
More complicated rules can be made as well. For instance we want to blacklist certain IP address we can by supplying the
address to the rule set.
Code:
# ufw allow from 192.168.1.100
You can also specify certain protocols with certain IP’s like so:
Code:
#ufw allow from 192.168.1.1 to any port 22
This will allow 192.168.1.1 to access port 22 on both tcp and udp.
If you want to allow only tcp append it to the end of the port 22/tcp
You can also use a netmask. Next let’s look at services. You can set services that can be found in
Code:
#cat /etc/services
For instance we want to allow telnet then we simply give
Code:
# ufw allow telnet
That simple.
Probably the best usage flag in ufw is the –dry-run which will not make any real changes but only show what would occur with the new rule in place.
We can also delete a rule and it will revert to whatever the default policy had at the beginning. More complicated rules can be made as well. For instance we want to blacklist certain IP address we can by supplying the
address to the rule set.
Code:
# ufw allow from 192.168.1.100
You can also specify certain protocols with certain IP’s like so:
Code:
#ufw allow from 192.168.1.1 to any port 22
This will allow 192.168.1.1 to access port 22 on both tcp and udp.
If you want to allow only tcp append it to the end of the port 22/tcp
You can also use a netmask. Next let’s look at services. You can set services that can be found in
Code:
#cat /etc/services
For instance we want to allow telnet then we simply give
Code:
# ufw allow telnet
That simple.
One caveat though is that the service must be installed on the host.
Probably the best usage flag in ufw is the –dry-run which will not make any real changes but only show what would occur with the new rule in place.
So for example
Code:
#ufw --dry-run deny ssh
If the rule will not work or the syntax is wrong it will spit back an error.
Also when adding rules the first match wins according to the man page.
So make your specific rules first then the general ones.
There are more to the rules as well as support for applications themselves.
Next thing we can look at is adding the gui interface, if needed.
The link is here, this download is a ".deb" package, you can install it using
Code:
#dpkg -i gufw_0.0.7c-all.deb
There are more things that can be done and if anyone needs help with it make a post here about it.
Subscribe to:
Posts (Atom)



