Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
I have setup up a box with madrake 10.1 and its running apache. I am behind a router and want to set the linux box of a static ip so ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Posts
    13

    How do i set a static ip address in Mandrake?


    I have setup up a box with madrake 10.1 and its running apache. I am behind a router and want to set the linux box of a static ip so i can forward all requests from the outside to that machine. To do this i need to set the machine to have a static ip. I have seen many ways of doing this with windows but can find any with linux? Does anyone know how to do it?

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Code:
    su -
    ifconfig eth0 123.123.123.123

  3. #3
    Just Joined!
    Join Date
    Nov 2004
    Posts
    13
    sorry, like i said im a newbie. If i wanted to make sure my linux box's ip address was always 192.168.1.105 how would this apply to the code?

    su - ifconfig eth0 192.168.1.105?

  4. #4
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    okay, to do it once, type into the terminal:
    Code:
    su -
    ifconfig eth0 192.168.1.105
    to make it do it at bootup, place this in your /etc/rc5.d/functions:
    Code:
    ifconfig eth0 192.168.1.105

  5. #5
    Just Joined!
    Join Date
    Nov 2004
    Posts
    13
    it works in console, but i cant find the file you referenced?

  6. #6
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    oh
    /etc/init.d/functions?

  7. #7
    Just Joined!
    Join Date
    Nov 2004
    Posts
    13
    okay that works, but now i can't get on the internet from that machine??

  8. #8
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    why? what happens?

  9. #9
    Just Joined!
    Join Date
    Nov 2004
    Posts
    3

    IP settings

    What about editing this file?

    /etc/sysconfig/network-scripts/ifcfg-eth0

    I see this stuff in there to edit for your IP:

    DEVICE=eth0
    BOOTPROTO=static
    IPADDR=192.168.10.2
    NETMASK=255.255.255.240
    NETWORK=192.168.10.0
    BROADCAST=192.168.10.255
    ONBOOT=yes
    METRIC=10
    MII_NOT_SUPPORTED=no

  10. #10
    Just Joined!
    Join Date
    Nov 2004
    Posts
    13
    it just wont connect, i can't start the eth0 connection?

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •