LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Simple LAN Server (https://www.linuxquestions.org/questions/linux-networking-3/simple-lan-server-248265/)

PDD 10-28-2004 03:21 AM

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

LinuxRam 10-28-2004 03:53 AM

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

phatboyz 10-28-2004 12:23 PM

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

PDD 10-29-2004 11:09 AM

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

phatboyz 10-29-2004 11:30 AM

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.

LinuxRam 10-29-2004 01:34 PM

@PDD

/etc/init.d/networt restart



-Akshat

PDD 11-01-2004 06:49 AM

HI Guys,

Still not working. Any ideas?

PDD

phatboyz 11-01-2004 10:51 AM

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.

PDD 11-01-2004 11:04 AM

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

phatboyz 11-01-2004 12:34 PM

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.

phatboyz 11-01-2004 12:53 PM

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?

phatboyz 11-01-2004 01:00 PM

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.

PDD 11-02-2004 03:39 AM

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.

phatboyz 11-02-2004 06:56 AM

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?

PDD 11-02-2004 07:12 AM

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


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