Saturday, 22 March 2008

Internet Connection Sharing in Ubuntu 704

Internet Connection Sharing is one of way to use internet connection together. As in my office, internet is one of facility reserved for assists officer performance. Now let us practice does share internet connection with Ubuntu as its(the server).

1. Configuration of your network. The server has two Ethernet Card (eth0 for to internet) and eth1 ( for to local network).

Configuration of Network to ISP ( eth0):
IP : 192.168.10.81 ( eth0)
Netmask : 255.255.255.0
Gateway : 192.168.10.1
DNS : 202.155.0.1

Configuration of Local Network ( eth1):
IP : 192.168.0.1
Netmask : 255.255.255.0

2. Edits file /etc/resolvconf :
nameserver 202.155.0.1

3. Edits /etc/network/interfaces :
auto eth0
iface eth0 inet static
address 192.168.10.81
netmask 255.255.255.0
gateway 202.155.0.1

auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0

4. Edits file in /proc/sys/net/ipv4/ip_forward, changes number 0 to become 1 or
Edits file in /etc/sysctlconf, adds line following :
net.ipv4.ip_forward = 1

5. Edits file in /etc/rclocal, adds line following that every server restarts automatically implements it :
iptables - t nat - A POSTROUTING - o eth0 - j MASQUERADE


6. Restarts Your Server.

7. Configuration Gateway and DNS in computer Client makes reference to IP your server.


Source : Various articles in Internet

0 comments: