Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Static IP Address

    Recalbox General
    static address
    5
    7
    5156
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • xstrex
      xstrex last edited by

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

      After remounting / rw.
      /etc/network/interfaces:
      auto lo
      iface lo inet loopback

      allow-hotplug eth0
      iface eth0 inet static
      address 192.168.2.XX
      netmask 255.255.255.0
      gateway 192.168.2.1

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

      Substring 1 Reply Last reply Reply Quote 0
      • Substring
        Substring @xstrex last edited by

        @xstrex Have you followed https://github.com/recalbox/recalbox-os/wiki/Manual-IP-settings-(EN) ?

        Former dev - Please reply with @substring so that i am notified when you answer me
        Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

        1 Reply Last reply Reply Quote 0
        • xstrex
          xstrex last edited by

          @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.

          Substring 1 Reply Last reply Reply Quote 0
          • Substring
            Substring @xstrex last edited by

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

            Former dev - Please reply with @substring so that i am notified when you answer me
            Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

            1 Reply Last reply Reply Quote 0
            • tekkenism
              tekkenism last edited by tekkenism

              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, 192.168.1.16 as example:

              then type:

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

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

              Then type:
              cd (enter)
              and then type:
              nano custom.sh (enter)

              Type the following text in nano editor:

              #!/bin/bash
              /usr/bin/connmanctl config ethernet_b827eb6462be_cable --ipv4 manual 192.168.1.16 255.255.255.0 192.168.1.1
              mount -o remount,rw /
              echo "nameserver 208.67.222.222" >> /etc/resolv.conf
              echo "nameserver 208.67.220.220" >> /etc/resolv.conf

              Please note that in our example custom.sh file:
              192.168.1.16: Your recalbox's IP address that'll be static.
              255.255.255.0: Your Subnet Mask
              192.168.1.1: 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 custom.sh
              to make it executable, then:
              reboot
              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.

              hexxx 1 Reply Last reply Reply Quote 1
              • hexxx
                hexxx @tekkenism last edited by

                @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.

                Regards

                1 Reply Last reply Reply Quote 0
                • Bkg2k
                  Bkg2k Staff last edited by Bkg2k

                  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
                  
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Want to support us ?

                  87
                  Online

                  98.6k
                  Users

                  28.1k
                  Topics

                  187.0k
                  Posts

                  Copyright © 2021 recalbox.com