Friday, December 5, 2008

IP-to-IP tunneling

This works under Linux machine
SERVER A:

OS: Linux
Network Interface: eth0
IP: 172.16.0.1

SERVER B:

OS: Linux
Network Interface: eth0
IP: 172.16.0.2

Now we create the tunnel with following parameters.
SERVER A: 10.0.0.1 / 255.255.255.252
SERVER B: 10.0.0.2 / 255.255.255.252

In Server A:

ip tunnel add tun0 mode ipip remote 172.16.0.1 local 172.16.0.2 dev eth0
ifconfig tun0 10.0.0.1 netmask 255.255.255.252 pointopoint 10.0.0.2
ifconfig tun0 mtu 1500 up

In Server B:
ip tunnel add tun0 mode ipip remote 172.16.0.2 local 172.16.0.1 dev eth0
ifconfig tun0 10.0.0.2 netmask 255.255.255.252 pointopoint 10.0.0.1
ifconfig tun0 mtu 1500 up

Now ping 10.0.0.2 from server A:
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.139 ms
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.139 ms

Finish..

All the best.

Thursday, November 27, 2008

Squid Installation in Linux

1. Download the source from squid-cache.org.

2. Untar the source file.

3. Go to squid source directory.

4.In terminal execute the command " ./configure ".

5. After completing the configuration just execute " make & make install ".

6. Now squid will be installed in " /usr/local/squid ".

7. Go to squid directory and open configuration file using vi editor like " vi etc/squid.conf " and
put these line " visible_hostname localhost ".

8. Execute the command " ./sbin/squid -z".

9. Now swap directories has created.

10. Then start the squid " ./sbin/squid -D ".

*. Normally squid runs on 3128 port.

More visit: http://squid.visolve.com/

Wednesday, October 8, 2008

Linux - Open Source - Daily Tips

Install New fonts in Linux ( Fedora and RedHat )

1. Download the font

2. Copy that font in to /usr/share/fonts

3. Then restart the Xserver [Log off and Log in again].

4. Now new font comes to usage for all applications
like Mozilla,Thunderbird etc....

Note : Tested Under Redhat and Fedora.


Iptable Tips

Open FTP (port 21) for local network

 iptables -I INPUT -s 192.168.1.0/255.255.255.0 -p tcp --dport 21 -j ACCEPT
OR Block FTP port for local network

 iptables -I INPUT -s 192.168.1.0/255.255.255.0 -p tcp --dport 21 -j REJECT
Change the file descriptor value

It will increase the performance of the whole server or system.

View the existing value using -> cat /proc/sys/fs/file-max

Change the Maximum file descriptor value by using this command -> echo 65536 > /proc/sys/fs/file-max

The above example, we should change file descriptor value to 65536.

Today's Quote:
The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it
--Linus Torvalds--

Regards,
Vivekanandan N.