LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 12-06-2005, 03:27 AM   #1
Hedon
Member
 
Registered: Aug 2005
Location: Bucharest, Romania
Distribution: Mandrake / Debian
Posts: 53

Rep: Reputation: 15
Network config file.


Hey there.

I have some problems with my web server because it passes trhough a router. Till now the computer with apache was launched with dhcp. I want to configure myself the network file, but I don't know wich one it is...

Thanks.
 
Old 12-06-2005, 07:08 AM   #2
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Rep: Reputation: 30
Is your router directing traffic on port 80 to your server?
 
Old 12-06-2005, 12:37 PM   #3
Hedon
Member
 
Registered: Aug 2005
Location: Bucharest, Romania
Distribution: Mandrake / Debian
Posts: 53

Original Poster
Rep: Reputation: 15
Well, it does.

Yet, if the ip changes (even thoguh it doesn't) I can't do anything about it. It's a hardware router.

I can't afort to set the router every time I start my computer (http server also).
 
Old 12-06-2005, 03:55 PM   #4
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
If you prefer to use a GUI then open the Mandrake Control Centre - all the network config tools are in there.

If you want to do it manually edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 (replace eth0 with whatever your network card is detected as). For example:
Code:
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.1
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes
Now you also need to edit the /etc/sysconfig/network file and add in the default gateway and (optionally) the hostname:
Code:
HOSTNAME=host.example.com
GATEWAY=xxx.xxx.xxx.xxx
Finally you should edit /etc/resolve.conf and add in the nameservers for your ISP.

This should replace all the stuff that DHCP usually configures for you.
 
Old 12-11-2005, 12:47 PM   #5
Hedon
Member
 
Registered: Aug 2005
Location: Bucharest, Romania
Distribution: Mandrake / Debian
Posts: 53

Original Poster
Rep: Reputation: 15
I have this in my ifcfg-eth0 :
Code:
DEVICE=eth0
BOOTPROTO=dhcp
IPADDR=192.168.2.2
NETMASK=255.255.255.0
NETWORK=192.168.2.0
BROADCAST=192.168.2.255
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=yes
USERCTL=yes
IPV6INIT=no
IPV6TO4INIT=no
PEERDNS=yes
NETMASK=255.255.255.0
IPADDR=192.168.2.2
DHCP_CLIENT=dhclient
DHCP_HOSTNAME=office.kappa.ro
NEEDHOSTNAME=yes
PEERDNS=yes
PEERYP=no
PEERNTPD=no
If I try to change it as it was mentioned, nothing works .
 
Old 12-11-2005, 01:16 PM   #6
Hedon
Member
 
Registered: Aug 2005
Location: Bucharest, Romania
Distribution: Mandrake / Debian
Posts: 53

Original Poster
Rep: Reputation: 15
What is ifcfg-sit0 ?
 
Old 12-11-2005, 04:07 PM   #7
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
You have to comment out all the DHCP entries and change BOOTPROTO to static
 
Old 12-15-2005, 07:25 AM   #8
Hedon
Member
 
Registered: Aug 2005
Location: Bucharest, Romania
Distribution: Mandrake / Debian
Posts: 53

Original Poster
Rep: Reputation: 15
the problem wasn't the icfg-eth0.
the problem was the resolv.conf & the DNS codes.

10x for your help.
 
Old 12-16-2005, 05:34 AM   #9
sam.pedraglio
Member
 
Registered: Jul 2005
Distribution: Mint 14 64bit
Posts: 71

Rep: Reputation: 16
Quote:
Originally Posted by Hedon
What is ifcfg-sit0 ?
If you've a firewire port on your pc, the network running on it is called sit0 normally.
 
  


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
network config file arunsri Slackware 6 05-15-2005 12:57 AM
Does any body have a simple Samba Config file for a peer to peer network? tlawlessrr Linux - Software 1 03-24-2004 11:26 PM
Where do network card config file locate in UNIX? woranl Linux - Networking 2 02-20-2004 08:35 AM
possible samba config problem or network config issue? rruffin Linux - Networking 3 06-03-2003 04:04 PM
Lan Config file / internet config file Raven_X_Neo Linux - Networking 1 10-30-2002 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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

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