My Headlines

Tuesday, March 29, 2011

LINUX HOWTO MINI INTERNET-CONNECTION-SHARING

LINUX HOWTO MINI INTERNET-CONNECTION-SHARING

I have ADSL ethernet modem, wired/cable, DNS.

www/adsl -> eth0 -> wlan0 -> ath0

Desktop network card eth0
Desktop wireless card wlan0
Laptop wireless card ath0

In Terminal:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i wlan0 -j ACCEPT

(Second iptables command - prevents ratelimit messages)

Monday, March 14, 2011

Pc Router On Ubuntu

As I said above, that here I assume you all have been successfully installed ubuntu 8.04 server version on a computer, then the first step to install the PC router on ubuntu is the Ubuntu updates and upgrades you, this is for all the packages required by ubuntu can be installed updates and upgrades as such, but before the update and upgrade our ubuntu to set ip address from your ISP and LAN as well, the following steps (login as root) :
root@server:~# vim /etc/network/interfaces
 
-- by pressing the letter i add the following line --
## ISP Connection
auto eth0
iface eth0 inet static
address 202.172.16.41
netmask 255.255.255.248
network 202.172.16.39
broadcast 202.172.16.47
gateway 202.172.16.40
## Koneksi to LAN
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
##gateway 192.168.1.1
-- save by pressing :wq and Enter --
If everything is ok, the next step is to make sure that the connection to the internet is ok,
with a step ping yahoo.com and if the reply is the connection to the Internet was ok and continue to update and upgrade ubuntu :
root@server:~# aptitude update && aptitude upgrade
For the next step after the update and upgrade is finished editing the sysctl.conf file:
root@server:~# vim /etc/sysctl.conf
by pressing the letter i find writing #net.ipv4.conf.default.forwarding = 1 and remove the fence that marks the net.ipv4.conf.default.forwarding = 1
save by pressing :wq and Enter
Edit the file ip_forward the valuabe 0 fox into 1 with the following steps:
root@server:~# echo "1" > /proc/sys/net/ipv4/ip_forward
Next we have to make the routing of eth 1 (LAN) to the eth0 (ISP / WAN), it is intended to allow LAN users can communicate with the outside world (the Global Internet), with the command:
root@server:~# /sbin/iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -d 0/0 -j MASQUERADE
Do not forget to save the command script we have made earlier in the rc.local, it is intended that when the computer is restarted the server then automatically orders we have made can be run by the server computer:
root@server:~# Vim /etc/rc.local
-- by pressing the letter i add the following line --
echo "1" > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -d
0/0 -j MASQUERADE
Computer server restart:
root@server:~# reboot

references : http://udiniqgeek.com/router_pc.html

Install Subversion and WebSvn on Ubuntu Server

On my last post I wrote about Ubuntu server and Webmin and why I changed WHS with Ubuntu server. Today I'm going to write about Subversion and WebSVN on Ubuntu server. One of the things that I had in WHS was a source control where I stored my code and documents. For that I used VisualSVN. VisualSVN combines Subversion with a web interface of all repositories and also includes user management. To me VisualSVN is the all in one...Veryyy goood product and unfortunately for me VisualSVN is just for Windows :(.
So one of the things I did before move to Ubuntu Server was backup my Subversion repositories so I could restore them on Ubuntu Server.
In Ubuntu Server I had to do install a few packages and do a few steps in order to once again have source control and a web interface. So today I'm going to explain how to install Subversion and WebSVN on Ubuntu server.
The first thing to do is install Subversion and apache package for Subversion. All I need to do is: 

RoundCube Change icon, logo, title ( Web Mail Tricks & Tips )

How to change the Logo

By default, the logo is located in the roundcube here:


/roundcube/skins/default/images


and the file name is


roundcube_logo.png


The easiest thing to do, is to use your favorite image editor, and create a png image that is is 165px x 55px. And name it roundcube_logo.png


Next step is to access your site via FTP/SFTP and change the name of the original file to something like


roundcube_logo.png.old


Then upload your custom image to the same directory. Refresh the browser and bask in the glow of your custom logo!



Change Page Title

Squid content filtering: Block / download of music MP3, mpg, mpeg, exec files

Q. For security and to save bandwidth I would like to configure Squid proxy server such way that I do not want my users to download all of the following files:
MP3
MPEG
MPG
AVG
AVI
EXE
How do I configure squid content filtering?
A. You can use squid ACL (access control list) to block all these files easily.

How do I block music files using squid content filtering ACL?

Saturday, March 12, 2011

Install Java Runtime Environment (JRE) in Ubuntu

Java is an object-oriented programming language developed by Sun Microsystems in the early 1990s. Java applications are compiled to bytecode, which at runtime is either interpreted or compiled to native machine code for execution.
The language itself derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. JavaScript, a scripting language, shares a similar name and has similar syntax, but is not directly related to Java. Currently Ubuntu has the following Java packages
sun-java6-bin - Contains the binaries
sun-java6-demo - Contains demos and examples
sun-java6-doc - Contains the documentation
sun-java6-fonts - Contains the Lucida TrueType fonts from the JRE
sun-java6-jdk - Contains the metapackage for the JDK
sun-java6-jre - Contains the metapackage for the JRE
sun-java6-plugin - Contains the plug-in for Mozilla-based browsers
sun-java6-source - Contains source files for the JDK
Installing the Java Runtime Environment


First you need to check multiverse repository enabled or not after that open a terminal window. Since you are going to be installing the JRE and the web browser plug-in, you’ll be using the following command from a terminal


sudo pico /etc/apt/source.list


add this line deb http://archive.canonical.com/ lucid partner
exit and save
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Once it downloads the packages and begins the installation, you’ll get a screen that contains the Sun Operating System Distributor License for Java and hit Enter to continue.
1
You’ll see a dialog that asks you if you agree with the DLJ license terms. Select Yes, and hit Enter; the JRE will finish installing.
2
Testing Java Runtime Environment
You’ll want to confirm that your system is configured properly for Sun’s JRE. This is a two-step process.
First, check that the JRE is properly installed by running the following command from a terminal.
java -version
You should get similar output
3
Testing Java Plugin for Firefox
open Firefox and typing about:plugins in the address bar and check for java plugin
4




Block Torrent Files on Squid Proxies

"BitTorrent is a peer-to-peer file sharing protocol used for distributing large amounts of data. BitTorrent is one of the most common protocols for transferring large files, and it has been estimated that it accounts for approximately 27-55% of all Internet traffic (depending on geographical location) as of February 2009" (see Wikipedia.org).

Install Ntop monitoring in Ubuntu

Ntop shows the current network usage. It displays a list of hosts that are currently using the network and reports information concerning the IP (Internet Protocol) and Fibre Channel (FC) traffic generated by each host. The traffic is sorted according to host and protocol. Protocols (user configurable) include:
  • TCP/UDP/ICMP
  • (R)ARP
  • IPX
  • DLC
  • Decnet
  • Netbios
  • TCP/UDP
    • o FTP o HTTP o DNS o Telnet o SMTP/POP/IMAP o SNMP o NFS o X11
  • Fibre Channel
    • o Control Traffic - SW2, GS3, ELS o SCSI
(In human-readable, this means you can very comprehensively monitor your network traffic, connections & bandwidth via a web output)

Installation

Install DansGuardian on Ubuntu Content Filtering

This summary is not available. Please click here to view the post.

Friday, March 11, 2011

Ubuntu Linux: NFS Client Configuration To Mount NFS Share

NFS (Network File System) client allows you to access shared directory from Linux client. The computer sharing the directory is called the NFS server (it can be NAS server too) and the computers or devices connecting to that server are called clients. The clients need to use the mount command to access the shared directory.

Ubuntu NFS

You need to install nfs-command package as follows (open terminal and type the following command):
$ sudo apt-get update
$ sudo apt-get install nfs-common

Tuesday, March 8, 2011

How to know the Computer Specifications in Ubuntu

Just like as in Windows may have the command Run -> dxdiag Then it would appear we spec PC in Linux is also available.
To Learn Computer Specs us in Linux, especially in Ubuntu may be more complete information than the Si Windows with default program

the steps are as follows:

Application -> Accessories -> Terminal enter the following command:

$ sudo lshw




After that we will know the specifications of the PC in Terminal
But it is better if we create an HTML file to be more userfriendly GUI
with the command:

$ sudo lshw -html > infohardware.html


then open infohardware.html with browser like firefox / opera .