Home » » Setting Static IP Internet Cafe Ubuntu

Setting Static IP Internet Cafe Ubuntu

I. ubuntu desktop as well as to billing servers.


eth0=external LAN (to modem)
eth1=internal LAN (to HUB - client PC)

1. Disable Network Manager
sudo update-rc.d -f NetworkManager remove
sudo apt-get remove network-manager network-manager-gnome

2. Edit File /etc/network/interfaces = sudo gedit /etc/network/interfaces.
Coppy and paste below (adjust according to your network)

auto lo
iface lo inet loopback

    auto eth1
    iface eth1 inet static
        address 192.168.2.1
        netmask 255.255.255.0
        network 192.168.2.0
        broadcast 192.168.2.255

    auto eth0
    iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

3. Edit DNS /etc/resolv.conf = sudo gedit /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

4. Remove DHCP client = sudo apt-get remove dhcp-client

5. Restart Network = sudo /etc/init.d/networking restart

6. Test connection
~$ ping google.com

===========================
II. Client : connect to billing servers

1. Disable Network Manager
sudo update-rc.d -f NetworkManager remove
sudo apt-get remove network-manager network-manager-gnome

2. Edit File /etc/network/interfaces = sudo gedit /etc/network/interfaces.
Coppy and paste below (adjust according to your network)

auto lo
iface lo inet loopback

    auto eth0
    iface eth0 inet static
        address 192.168.2.10 #you can add 192.168.2.2 - up to 192.168.2.255
        netmask 255.255.255.0
        network 192.168.2.0
        broadcast 192.168.1.255
        gateway 192.168.2.1

3. Edit DNS /etc/resolv.conf = sudo gedit /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

4. Remove DHCP client = sudo apt-get remove dhcp-client

5. Restart Network = sudo /etc/init.d/networking restart

6. Test connection
~$ ping google.com
Share this article :

0 comments:

Post a Comment

Please fill your name to response.

Labels