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 |
Quote:
Quote:
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:
and for web server wait for someone else to answer -Akshat |
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 |
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 |
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. |
@PDD
/etc/init.d/networt restart -Akshat |
HI Guys,
Still not working. Any ideas? PDD |
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. |
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 |
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. |
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? |
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.
|
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. |
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?
|
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. |