Results 1 to 8 of 8

Thread: 12.04 - making my network address permanent

  1. #1
    Join Date
    Oct 2010
    Location
    South Africa
    Beans
    14
    Distro
    Ubuntu 10.04 Lucid Lynx

    SOLVED : 12.04 - making my network address permanent

    I am running dhcp3-server with hostapd to create a wifi hotspot on my netbook. To set it up I followed the following howto:

    http://exain.wordpress.com/2011/03/3...rdusb-adapter/


    and it runs successfully when I do the following terminal commands after bootup

    1. sudo ifconfig wlan0 10.10.0.1

    2. Then I have to restart isc-dhcp-server and hospapd > both of which are started succesfully on bootup

    My problem is the ip address of wlan0 - it is lost on a reboot and has to be manually entered.

    My etc/network/interfaces file is as follows:

    auto lo
    iface lo inet loopback

    iface wlan0 inet static
    address 10.10.0.1
    netmask 255.255.255.0

    yet an ifconfig after bootup dosn't show the wlan0 with this address
    Last edited by User#32423; April 30th, 2012 at 10:24 PM. Reason: SOLVED

  2. #2
    Join Date
    Aug 2011
    Location
    Berlin, Germany
    Beans
    7,306
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: 12.04 - making my network address permanent

    Change "false" to "true" in the file /etc/NetworkManager/NetworkManager.conf, otherwise these entries are ignored by the NM

  3. #3
    Join Date
    Oct 2010
    Location
    South Africa
    Beans
    14
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 12.04 - making my network address permanent

    Problem persists

    I edited the following line in my /etc/NetworkManager/NetworkManager.conf to:

    managed=true

    this doesn't though make a difference, after a reboot;

    ifconfig gives:

    wlan0 Link encap:Ethernet HWaddr f0:7b:cb:3f:0d:da
    inet6 addr: fe80::f27b:cbff:fe3f:dda/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:17 errors:0 dropped:0 overruns:0 frame:0
    TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:4342 (4.3 KB) TX bytes:8561 (8.5 KB)

    And the network doesn't work.

    Yet after:

    sudo ifconfig wlan0 10.10.0.1

    ifconfig gives:

    wlan0 Link encap:Ethernet HWaddr f0:7b:cb:3f:0d:da
    inet addr:10.10.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
    inet6 addr: fe80::f27b:cbff:fe3f:dda/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:168 errors:0 dropped:0 overruns:0 frame:0
    TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:33748 (33.7 KB) TX bytes:42079 (42.0 KB)

    And after doing the manual;

    sudo /etc/init.d/isc-dhcp-server restart

    sudo hostapd -dd /etc/hostapd/hostapd.conf

    Other computers and android phones can connect to the network.

    After
    sudo iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o ppp0 -j MASQUERADE

    They can all browse. And download email. etc

    How do I give the wlan0 the address at bootup?

  4. #4
    Join Date
    Aug 2011
    Location
    Berlin, Germany
    Beans
    7,306
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: 12.04 - making my network address permanent

    Add the line without sudo before "exit 0" into /etc/rc.local

  5. #5
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,782

    Re: 12.04 - making my network address permanent

    you may want to append your wlan0 line with auto

    auto brings the interface up at boot time, which is what you want to do right ?

    example

    Code:
    auto wlan0
    iface wlan0 inet static
    your initial post doesnt seem to have that.
    Feel Free to Bitcoin Tip: 135Rp4pwwYTHEJ4u8bxKaDQiC91N9LUoV2

    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  6. #6
    Join Date
    Oct 2010
    Location
    South Africa
    Beans
    14
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 12.04 - making my network address permanent

    Thankyou, both.

    I went with the "auto" solution and it works beautifully.


  7. #7
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,782

    Re: 12.04 - making my network address permanent

    Quote Originally Posted by User#32423 View Post
    Thankyou, both.

    I went with the "auto" solution and it works beautifully.

    no problem.

    You are welcome.


    Peace
    Feel Free to Bitcoin Tip: 135Rp4pwwYTHEJ4u8bxKaDQiC91N9LUoV2

    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  8. #8
    Join Date
    Jun 2010
    Beans
    10

    Re: 12.04 - making my network address permanent

    I hope some of you can help me out. I have followed the instructions set out in a very helpful blog:

    http://thenewbieblog.wordpress.com/2...tup-on-ubuntu/

    I happen to have the same wireless card, and the Android (and Blackberry Playbook) devices I try to connect can handshake but hang when acquiring the IP address.

    What it looks like NOT working well is the dhcp server. If I try to stop it with either:
    sudo service isc-dhcp-server restart
    or sudo /etc/init.d/isc-dhcp-server restart

    I get to the same error:
    stop: Unknown instance:
    isc-dhcp-server start/running, process 3602

    I found the following commands, which for whatever reason do help to re-set everything:
    sudo chown root:root /etc/dhcp/*
    sudo chmod 655 /etc/dhcp/dhcpd.conf
    sudo service isc-dhcp-server restart

    Then I need to still manually do
    sudo ifconfig wlan0 10.10.0.1
    sudo iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o eth0 -j MASQUERADE

    I am at a loss. If anyone could help me, I would truly appreciate it. I own a Blackberry Playbook and the only way to connect to a VPN service using PPTN protocol is by using my laptop as a wireless router. It works, but it would be nice to have it running without having to open a terminal and try 5 different things.

    I run Ubuntu 12.04, not a clean install (I have been moving up since 10.04) ASUS 64-bit laptop.

    Thank you in advance for any help you can provide.
    Last edited by elcalamar; June 29th, 2012 at 05:02 AM. Reason: typo
    Winnipeg ROCKS!

Tags for this Thread

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
  •