Monday, September 5, 2011

Network configuration with a minimal installation

I get a Server with a Debian 6.0.2 and minmal installation.
Because this he has no network connection and i have to edit all files with nano.

For a correct connection to the internet i edited the following files:

/etc/networt/interfaces
auto eth0
# The loopback network interface
iface lo inet loopback
# The primary network interface
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.10
dns-nameserver 192.168.0.10


In this way the local ip adress is 192.168.0.1 and the gateway (in this case a router) is 192.168.0.10 .
The ip-adress is in this case static, and with auth eth0 the connection is coming up automatic.

Then i add the nameserver to the
/etc/resolve.conf
nameserver 192.168.0.5

Then i edit the
/etc/rc.local
route add -host 192.168.0.1 eth0
route add 192.168.0.0 gw 192.168.0.10


This add the route to the kernel routing table every time i boot.





No comments:

Post a Comment