LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-28-2004, 03:21 AM   #1
PDD
Member
 
Registered: Oct 2004
Location: Dublin
Distribution: RedHat 9.0
Posts: 59

Rep: Reputation: 15
Simple LAN Server


Hi Guys,

Linux n00b here so excuse me in advance for an glaringly easy questions. I have just installed Debian on an old box (Im having alot of problems with X but thats another thread) however I cant see the box on the network.

Ok first off can you guys point me to a really good resource for a Linux networking n00b that way I dont have to be bothering you.

I used the ifconfig command to give me the IP address of the box and hostname to get its hostname. Now when I go to ping it I can ping via IP no problem but not via hostname. Any ideas?

I intend running a very basic webserver and file server from the box so if you guys know any very basic (a.k.a n00b friendly) resources for how to go about doing this with Debian it would be much appreciated.

Cheers,

PDD
 
Old 10-28-2004, 03:53 AM   #2
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Rep: Reputation: 30
Quote:
Ok first off can you guys point me to a really good resource for a Linux networking n00b that way I dont have to be bothering you.
Either search google or tldp.org

Quote:
I used the ifconfig command to give me the IP address of the box and hostname to get its hostname. Now when I go to ping it I can ping via IP no problem but not via hostname. Any ideas?

Open ur /etc/hosts file and make and entry like this

<ip of ur system > <hostname of ur system>

for example
192.168.1.1 alpha

Quote:
I intend running a very basic webserver and file server from the box so if you guys know any very basic (a.k.a n00b friendly) resources for how to go about doing this with Debian it would be much appreciated.
For file server on linux (NFS server) then check "post 3" of this thread http://www.linuxquestions.org/questi...hreadid=247090
and for web server wait for someone else to answer


-Akshat
 
Old 10-28-2004, 12:23 PM   #3
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
You can not ping by hostname unless you have it in your hosts file.
Are you trying to ping by hostname from what type of computer. I assume that this is a windows box.

If on 98
go to command promt c:\edit hosts
XP Home
c:\windows\system32\drivers\etc\edit host
XP Pro
c:\winnt\system32\drivers\etc\edit hosts

Linux

/etc/vi hosts

For your web server look into apache.org
If you have installed the full cd for linux see if you can start
httpd

Last edited by phatboyz; 10-28-2004 at 12:30 PM.
 
Old 10-29-2004, 11:09 AM   #4
PDD
Member
 
Registered: Oct 2004
Location: Dublin
Distribution: RedHat 9.0
Posts: 59

Original Poster
Rep: Reputation: 15
Hi Guys,

I looked at /etc/hosts and it contained the following

127.0.0.1 elvis localhost

I put in the following entry

192.168.148 elvis localhost

I saved, exited and no change. Is there a command re-intialise the network settings so I know that any new information has been added?

PDD
 
Old 10-29-2004, 11:30 AM   #5
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Go back and add the 127.1.1.1 address and leave localhost there.
That is you loopback address. GO down a line and and 192.168.1.145 elvis

Elvis will be the computer name that you want to look up by name, not the computer your using.

Last edited by phatboyz; 10-29-2004 at 11:31 AM.
 
Old 10-29-2004, 01:34 PM   #6
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Rep: Reputation: 30
@PDD

/etc/init.d/networt restart



-Akshat
 
Old 11-01-2004, 06:49 AM   #7
PDD
Member
 
Registered: Oct 2004
Location: Dublin
Distribution: RedHat 9.0
Posts: 59

Original Poster
Rep: Reputation: 15
HI Guys,

Still not working. Any ideas?

PDD
 
Old 11-01-2004, 10:51 AM   #8
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Ok I can help, but I need to know what os that you are running. Then post the out put of
cat /etc/hosts

Then we'll work on this. Also you might need to disable your firewall for a second to ping. By defaut iptables is set to drop requests.
 
Old 11-01-2004, 11:04 AM   #9
PDD
Member
 
Registered: Oct 2004
Location: Dublin
Distribution: RedHat 9.0
Posts: 59

Original Poster
Rep: Reputation: 15
Hi Phatboyz,

Cheers for the help, much appreciated.

Im running Debian 3.0 R2

I cant paste the output of /etc/hosts cause I have no way of getting it off the system. I cant even get SSH to work. It just seems everything networky is fucked. Ive installed proftpd and it wont work either. The only thing I can do i ping the bloody machine and bing apache up on 192.168.0.148:80.

Any chance you could help me get SSH sorted. IVe set it up perfectly according to the exmaples from the site and its running fine it just wont accet my password.

PDD
 
Old 11-01-2004, 12:34 PM   #10
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Ok seems since that you are having trouble getting any networked service to work. Turn off iptables.

I am not familiar with debian. Do you know how to turn off your firewall?

Try (service iptables stop) from your command line. Then see if everythings works. If so we need an iptables guru to help.
 
Old 11-01-2004, 12:53 PM   #11
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Can you give me you topology?

IE 2 cumputers,crossover cable or switch,cable modem,dsl modem,

You have 2 computer one named fred and the other frank
Fred's ip is 192.168.1.2
Franks ip is 192.168.1.3

You have setup the hosts file so you can ping by hostname correct?

Your host file should in include this

127.0.0.1 localhost
192.168.1.2 fred

Do you have something to this effect?
 
Old 11-01-2004, 01:00 PM   #12
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
I just realized that you didn't know that there is a software firewall built into linux. Either iptables or ipchains....Should be the first with most current updates, but I think kernal 2.4 uses ipchains or was it before 2.4....I'm not sure on this one.
 
Old 11-02-2004, 03:39 AM   #13
PDD
Member
 
Registered: Oct 2004
Location: Dublin
Distribution: RedHat 9.0
Posts: 59

Original Poster
Rep: Reputation: 15
LAN Server

Hi Phatboyz,

Cheers once agian.

Id no idea that there was a firewall built in, I suspected as much but I wonder why its not stated in any of the tutorials and guides Ive read about Linux networking. Its one of the things that annoys me about linux documentation there is alot of assumption on the part of the writter that the reader knows certain things. Anywho...

I have two machines, elvis and workstation on a simple network both connected to a dsl combo router. They can ping each other fine via IP but not by name.

Elvis 192.168.0.148
Workstation 192.168.0.149

In my /etc/hots file the following:

127.0.0.1 localhost evlis
192.168.0.148 elvis

Ive checked and iptables doesnt seem to be working it gives the following error when I put in the command iptables -L

cant initialise IPTables table 'Filter' : IP Tables who? (do you need insmod?) Perhaps your iptables or kernel need to be updated.

I have made sure that the kernal and the iptables are the most up to date.
 
Old 11-02-2004, 06:56 AM   #14
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Hum....You say that the hosts file is correct so you should be able to ping by name. Are both computers linux based? What kernal are you using?
 
Old 11-02-2004, 07:12 AM   #15
PDD
Member
 
Registered: Oct 2004
Location: Dublin
Distribution: RedHat 9.0
Posts: 59

Original Poster
Rep: Reputation: 15
The other box is a RedHat 9 install 2.4

I managed to get FTP up and running kind of. I can log in by user but not anon. Its all to do with groups and permissions etc. Know any good tutorials for this?

PDD
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
running FTP server on a LAN for folks outside of the LAN johnMG Linux - Networking 4 12-23-2006 04:10 PM
How do I make a simple File server for my home LAN? cpaumelle Linux - Newbie 1 07-23-2004 07:19 AM
Simple LAN how-to for RH9? harnadem Linux - Newbie 5 03-23-2004 11:07 AM
Simple LAN setup SBarretDolph Linux - Networking 2 01-22-2004 09:34 AM
Browsing a Simple LAN? stedo Linux - Newbie 6 11-17-2003 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration