Static IP Address

  • No matter what I've tried, I can NOT set a static IP address.

    After remounting / rw.
    auto lo
    iface lo inet loopback

    allow-hotplug eth0
    iface eth0 inet static
    address 192.168.2.XX

    reboot - DHCP address..
    Been at this for hours, where oh where is dhcp configured???

  • @Substring I have followed them to the T, even copied and pasted the config found there, but updated it for my network settings. The ifup eth0 && ifdown eth0 works, and gives me the correct IP address. But if I reboot, I'm back at the dynamic IP, no matter what I've tried.

  • @xstrex can't check for niw, but part of the config could be in /var. Have you looked around there ?

  • For everyone who needs static IP address (for Port Forwarding/Netplay):
    Recalbox should be on and connected to the same modem/network as your PC. Tested on Windows 10:
    Go to Command Prompt (On Keyboard press Win Key+R, type: cmd and enter)
    Type the following commands:

    ping recalbox
    (You'll get your recalbox's IP address) In this case, as example:

    then type:

    ssh root@ (enter)
    Answer 'yes' to all the questions, it will ask for your recalbox's root password, type recalboxroot as password.

    connmanctl services and note what is returned, for example:
    *AO Wired ethernet_b827eb6462be_cable

    Then type:
    cd (enter)
    and then type:
    nano (enter)

    Type the following text in nano editor:

    /usr/bin/connmanctl config ethernet_b827eb6462be_cable --ipv4 manual
    mount -o remount,rw /
    echo "nameserver" >> /etc/resolv.conf
    echo "nameserver" >> /etc/resolv.conf

    Please note that in our example file: Your recalbox's IP address that'll be static. Your Subnet Mask Your modem/router IP address.

    Replace ethernet_*** by the value you've got previously and the IP address you want to give. You might wish to replace the DNS server IPs of the OpenDNS project, with the DNS servers (if any) provided by your own ISP.

    Then quit from nano text editor by Ctrl X, answer the saving question by typing Y and then finally Enter.

    After quiting nano and back to terminal shell, type the command:
    chmod +x
    to make it executable, then:
    to restart your Recalbox.

    Finally, go to your modem/router Port Forwarding page, forward the port numbered 55435 (both TCP/UDP) to your Recalbox's IP address.

    Successfully tested on Recalbox 6.0.
    Let me know in case if you have any problem.

  • @tekkenism Hello, I tried the method that you posted and after I rebooted recalbox it went back to dynamic IP. I don't know what can be wrong with it.


  • Staff
    Global moderator

    Most home internet box and routers have everything you need:

    Regarding port forwarding, most devices have PAT/NAT option taking a hostname or an IP. Just configure your target machine using its hostname: RECALBOX

    Then, if you still need static IP addresses, most devices allow to reserve and assign IPs to devices identified by their MAC addresses. IMHO it's the cleaner way to assign static IP in a home network.

    If it's still not enough, pick up an IP address outside the range of your DHCP, and fill in the required fields in recalbox.conf:

    wifi.ip=manual ip address
    wifi.gateway=new gateway
    wifi.netmask=new netmask

Log in to reply

Want to support us ?