Results 1 to 9 of 9

Thread: Setting up a static IP address

  1. #1
    Mikey Guest

    Setting up a static IP address

    Hi
    I bought a new Raspberry Pi 3 the other day and installed Kali Linux without any problems and can connect to it via 'Putty' using the ip address thats in the wlan1 (I'm using an 'Alfa' card). I'd like to setup a static IP address as I want to take the Pi with me when I'm out and about in my local city.

    I watch several videos on Youtube but after following them I'm still not able to connect using the static ip address that I assigned to the pi but I can still connect using 'Putty' with the old Ip address. I've checked the settings a few times and they are correct, but I still can't connect with the stic IP address.

    I'd be grateful if someone would tell me what I'm doing wrong here.

    Thanks a lot

  2. #2
    1. Determine your interface, eg eth0
    2. Modify /etc/network/interface such as:

    allow-hotplug eth0
    iface eth0 inet static
    address 192.168.0.1/24

    then reboot.

  3. #3
    Join Date
    2016-Dec
    Posts
    806
    You'll probably need to set-up an AP if you want to connect wirelessly to the RPi. Use hostapd for that. Otherwise, if you're connecting to an AP, skip this.

    Here is the docs explaining how to set-up an IP: https://wiki.debian.org/NetworkConfiguration

  4. #4
    Mikey Guest
    Quote Originally Posted by Mister_X View Post
    You'll probably need to set-up an AP if you want to connect wirelessly to the RPi. Use hostapd for that. Otherwise, if you're connecting to an AP, skip this.

    Here is the docs explaining how to set-up an IP: https://wiki.debian.org/NetworkConfiguration
    Hello Mister_X

    Thanks for the reply.

    I have a problem at present that prevents me using the link you provided. I tried to add a static ip address in /etc/network/interfaces and 'ballsed' it up by making changes by following some idiot on youtube.

    I should have made a copy of it before I started, but like an idiot I didn't bother. Now I can't do anything with the Pi.

    I looked around for a default layout but wasn't sure if I had the right one or not. I'm using Kali Linux with an 'Alfa Card' attached which is giving me wlan1 instead of wlan0.

    Do you think I should leave the Alfa card off and reset the network/interface back to its default state and then try to set up a static ip address from there.

    Any help here would be gratefully recieved.

    Thanks a lot

  5. #5
    Mikey Guest
    Hi
    I managed to take a snap shot of my Network interface and this is what it looks like at the moment

    Screenshot_2020-02-02_22-57-44.jpg

    It doesn't look too dissimilar from the on in rollercoaster's post but not quite the same.

    I apologise for being a pain but if I make alterations I might make it worse than it already is.

    Can someone look at it and tell me what needs changing.

    Thanks a lot for your patients.

  6. #6
    The issue there seems to be that you mixed dhcp and static configurations. On the line that says

    iface wlan1 inet dhcp
    ...

    that means you are wanting your wlan1 to acquire an IP via DHCP and yet you added additional lines that are reserved for static assignment. So essentially, conflicting. If you want static IP addressing change that line to:

    iface wlan1 inet static

    and keep the rest of the lines below.

  7. #7
    Mikey Guest
    Thanks rollercoaster

    I'll do that.

    So easy when you know what your doing isn't it.

    Best wishes

  8. #8
    One issue that you might encounter though. The AP leases an IP via DHCP. There is no way for it to know that your statically-assigned IP is in use, hence it can be assigned to any one else. That can cause you lots of connection issues which might be hard to debug if you don't know to troubleshoot.

  9. #9
    Join Date
    2020-Aug
    Posts
    1
    pls i want to change mi IP who can help me out ?

Similar Threads

  1. Setting a Static IP Problem
    By infes7 in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2022-11-20, 02:57
  2. Setting a static IP in /etc/network/interfaces
    By gCoreByte in forum General Archive
    Replies: 1
    Last Post: 2013-12-04, 14:08
  3. Installing Kali 1.0.3 using static IP-address?
    By ejkali in forum Installing Archive
    Replies: 3
    Last Post: 2013-05-13, 13:45

Posting Permissions

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