View Full Version : [ubuntu] Newb server setup
trs21219
December 4th, 2008, 11:30 PM
ok here goes,
i have an old computer (Celeron Processor, 256MB RAM). i wanted to make a server at home for just playing around with stuff that i dont want to put on my hosted box. (SSH Practice, configurations, load balancing etc). the only problem is that i cant get it to connect to the internet.
its hooked up via Ethernet directly into my router and it shows up in the connected devices on the network page of my router. i try to ping google and i get "connect: Network is unreachable" i try to download updates and i get "Could not resolve 'security.ubuntu.com'"
this is the first time ive used linux (other than some minor ssh configuring my webserver for work). i dont want to install the desktop version because i want to learn how to do it via command line for the future.
any help would be much appreciated :)
hictio
December 5th, 2008, 12:07 AM
How are all the other computers on your LAN getting their IP address? Do you set it up manually, or the computers get their IP address automatically?
trs21219
December 5th, 2008, 12:10 AM
the others are automatic but i set a static ip for the one im trying to get.
i set it to 192.168.1.4 as static on my router
trs21219
December 5th, 2008, 12:17 AM
here is a couple shots of my router...
BTW the name for it is SERVER-01
hictio
December 5th, 2008, 12:30 AM
the others are automatic but i set a static ip for the one im trying to get.
i set it to 192.168.1.4 as static on my router
Ok, on the router, but what about on the Ubuntu Server itself?
What does return if you type:
ifconfig (ENTER)
On the Server's console?
trs21219
December 5th, 2008, 12:35 AM
if i do the ifconfig i get
Link encap: Local Loopback
inet addr: 127.0.0.1 Mask: 255.0.0.0
intet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU: 16436 Metric: 1
RX packets: 0 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 0 errors: 0 dropped: 0 overruns: 0 carrier: 0
collions : 0 txqueuelen:0
RX bytes: 0 (0.0 B) TX bytes: 0 (0.0B)
trs21219
December 5th, 2008, 12:37 AM
just tried to test it by using the router to ping it and got 100% loss
hictio
December 5th, 2008, 12:40 AM
Cool, you don't have an IP address assigned to your NIC.
Post the outout of this command:
lshw -C Network (ENTER)
To see which NIC do you have, if any.
Yes, you won't be able to ping your box from the router, nor your router from the Ubuntu box because the Ubuntu Server has no IP address, it is for every means, offline.
trs21219
December 5th, 2008, 12:47 AM
k here is the output
WARNING: you should run this program as a super user
*-network DISABLED
description: Ethernet Interface
product: RTL...
vendor: realtek
physical id: 2
bus info: pci@0000:02:02.0
logical name: eth1
version : 10
width: 32bits
clock: 33MHz
bapabilities: bus_master cap_list ethernet physical
configuration: broadcast=yes
driver = 8139too driver version = 0.9.28 latency=64 max letency = 64 mingnt = 32 module = 8139too multicast=yes
hictio
December 5th, 2008, 12:54 AM
Cool, do this.
sudo ifconfig eth1 192.168.1.4 netmask 255.255.255.0 up (ENTER)
sudo route add default gw 192.168.1.1 (ENTER)
Important! I'm guessing the netmask & the default gateway values!! Taylor those to your LAN! :D
After that, ping your router, and from the router ping your Ubuntu box to test it.
If works, ping 64.233.161.83 (which is one of the gmail.com IPs), if it works, to are reaching the internet. You'll need to see if you have a couple of DNSs on /etc/resolv.conf, tyr pinging gmail.com to see if it works.
trs21219
December 5th, 2008, 12:57 AM
ah yes! that worked perfectly. thank you so much... ):P
hictio
December 5th, 2008, 01:07 AM
Be aware that this won't survive a reboot, you'll have to setup the values thru the file: '/etc/network/interfaces' and also, don't forget to add a couple of DNS servers' IPs to /etc/resolv.conf; you'll have to do that as the user root, thru sudo, they are simple text files.
/etc/network/interfaces:
auto lo eth1
iface lo inet loopback
iface eth1 inet static
address xxx.xxx.xxx.xxx (your ip)
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx (gateway ip)
/etc/resolv.conf:
nameserver xxx.xxx.xxx.xxx (dns server ip)
nameserver xxx.xxx.xxx.xxx (dns 2 server ip)
Setup this, and reboot to test that everyhing comes up A Ok.
trs21219
December 5th, 2008, 01:32 AM
hmm didnt work the first time let me try agian... when it loads it says it couldnt load the interfaces one so im assuming i did that one wrong.. the other one looks to be ok though i set it to opendns
trs21219
December 5th, 2008, 01:41 AM
sweet got it working :) thank you so much.. im beginning to like this linux stuff.
hictio
December 5th, 2008, 01:48 AM
Cool, now make it a server and serve something :D
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.