Results 1 to 8 of 8

Thread: Static Internet Protocol

  1. #1
    Join Date
    Aug 2008
    Beans
    412

    Static Internet Protocol

    Hey guys, I need a static network IP. I have ports forwarded for 192.168.1.101 and I need my server PC (ubuntu) to have that IP. Trouble is ive only ever done this on windows before. can someone help?

    Thanks

    Ubuntu 8.10
    Ethernet connection


    thanks

  2. #2
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    21,462
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Static Internet Protocol

    Remove, if it's still there, Network Manager.
    Code:
    sudo gedit /etc/network/interfaces
    Make it read like:
    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
    address 192.168.1.101
    netmask 255.255.255.0
    gateway 192.168.1.1
    Substitute your gateway, if it's not 192.168.1.1. Proofread, save and close gedit. Then do:
    Code:
    sudo /etc/init.d/networking restart
    You should be all set!
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  3. #3
    Join Date
    Aug 2008
    Beans
    412

    Re: Static Internet Protocol

    Code:
    sudo /etc/init.d/networking restart
    when I did that, I got a jolly old message:

    * Reconfiguring network interfaces...
    /etc/network/interfaces:5: duplicate interface
    ifdown: couldn't read interfaces file "etc/network/interfaces"
    /etc/network/interfaces:5: duplicate interface
    ifup: couldn't read interfaces file "/etc/network/interfaces"
    [Fail]

    /trouble!

  4. #4
    Join Date
    Aug 2008
    Beans
    412

    Re: Static Internet Protocol

    No one any ideas?

    By removing the line in bold:

    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet static
    address 192.168.1.101
    netmask 255.255.255.0
    gateway 192.168.1.1
    I managed to get rid of the error, but when I rebooted and did ifconfig, I found out that its still given me a random IP.

  5. #5
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    21,462
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Static Internet Protocol

    Please do:
    Code:
    cat /etc/network/interfaces > interfaces.txt
    A text file will be created called interfaces.txt. Please post it here.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  6. #6
    Join Date
    Aug 2008
    Beans
    412

    Re: Static Internet Protocol

    auto lo

    auto eth0
    iface lo inet loopback
    address 192.168.1.101
    netmask 255.255.255.0
    gateway 192.168.1.1


    that right?

  7. #7
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    21,462
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Static Internet Protocol

    No, sir. It should be:
    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
    address 192.168.1.101
    netmask 255.255.255.0
    gateway 192.168.1.1
    Then please do:
    Code:
    sudo /etc/init.d/networking restart
    Let us know about any errors.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  8. #8
    Join Date
    Aug 2008
    Beans
    412

    Re: Static Internet Protocol

    Perfection, thank you so much for the help man!!!

Bookmarks

Posting Permissions

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