Static IP on Toon for external control

Everything about external control, apps, VNC, etc goes here.

Moderators: marcelr, TheHogNL, Toonz

said0066
Starting Member
Starting Member
Posts: 13
Joined: Mon Feb 18, 2019 4:18 pm

Static IP on Toon for external control

Post by said0066 »

Hi,

How do I give my rooted Toon a static IP address? It now has a dynamic IP address.

Also, after I have done this, how do I portforward the correct port in my router for external control out of my home network? In my home network I have x11vnc control on port 5900 on my android Phone.

I have a ASUS AC87U.

Thanks in advance.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Static IP on Toon for external control

Post by marcelr »

You don't really need a static IP. All you want is probably that your DHCP server assigns the same IP address to your toon every time it connects to your router.
Checkout "Enable Manual Assignment" in your DHCP server settings to do this, and "Port Forwarding" in the WAN settings to forward the port for VNC to your toon.
richardklasens
Starting Member
Starting Member
Posts: 15
Joined: Fri Feb 15, 2019 10:13 pm

Re: Static IP on Toon for external control

Post by richardklasens »

Hi all.

I want to do the same, because (for the time beeing,) i'm stuck with a Huawei 4g (b525-23a) Mobile internet Router.
I dont have Ziggo or a Fiber-connected internet possiblity for now. no cables leading to my house :(

Point is, that with my Huawei 4g Modem i can't force the modem to assign a fixed IP to my Toon.
The only option for now is setting a fixed IP in my Toon.
Somebody knows how to do that?

FW 5.0.4
Rooted with full automatic Script by MartenJacobs.

Thanks!
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Static IP on Toon for external control

Post by TheHogNL »

Static IP on the toon itself (not recommended, but ok if you really want it):

/qmf/config/config_hcb_netcon.xml

Change for the interface you want to set static ip (eth0 or wlan0):

Code: Select all

    <configtype>dhcp</configtype>
to

Code: Select all

    <configtype>static</configtype>
and add

Code: Select all

    <static_ipaddress>192.168.178.65</static_ipaddress>
    <static_netmask>255.255.255.0</static_netmask>
    <static_gateway>192.168.178.1</static_gateway>
    <static_nameserver>192.168.178.1</static_nameserver>
Be sure you keep this config within the <interfaceSettings> for the interface you want to set the static ip for. Then reboot.

Note: /etc/network/interfaces will then be change to contain this IP adres. But never change the IP adres there as this is overwritten by hcb_netcon, a internal toon process.
Member of the Toon Software Collective
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Static IP on Toon for external control

Post by marcelr »

... and make sure to make NO mistakes in typing.

If the software cannot set the static IP because of a typo, you will have to open up your toon again ...
richardklasens
Starting Member
Starting Member
Posts: 15
Joined: Fri Feb 15, 2019 10:13 pm

Re: Static IP on Toon for external control

Post by richardklasens »

marcelr wrote:... and make sure to make NO mistakes in typing.

If the software cannot set the static IP because of a typo, you will have to open up your toon again ...
I can also connect thru the wired ethernetport, if i Made a misstake?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Static IP on Toon for external control

Post by TheHogNL »

Only if your mistake doesn't also affect the ethernetport config :-)
Member of the Toon Software Collective
richardklasens
Starting Member
Starting Member
Posts: 15
Joined: Fri Feb 15, 2019 10:13 pm

Re: Static IP on Toon for external control

Post by richardklasens »

In that case.. do not try to make a mistake :lol:
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Static IP on Toon for external control

Post by TheHogNL »

But yeah, you could always connect on the serial port again if you break it. Just try it. Making failures will only help you get better skills 8)
Member of the Toon Software Collective
richardklasens
Starting Member
Starting Member
Posts: 15
Joined: Fri Feb 15, 2019 10:13 pm

Re: Static IP on Toon for external control

Post by richardklasens »

Thnx for the info! Worked like a charm! :D
hellwich
Starting Member
Starting Member
Posts: 6
Joined: Sat Apr 14, 2018 1:27 am

Re: Static IP on Toon for external control

Post by hellwich »

Worked like a charm, but how to add a second static nameserver?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Static IP on Toon for external control

Post by TheHogNL »

hellwich wrote:Worked like a charm, but how to add a second static nameserver?
If you think your really need this, create this file "/etc/udhcpc.d/90custom"
(change the ns to your own secondary NS)

Code: Select all

ns="8.8.8.8"
if ! grep -q $ns /etc/resolv.conf
then
        echo "$0: Adding secondary DNS $ns"
        echo "nameserver $ns" >> /etc/resolv.conf
fi
Change it to allow to execute with:

Code: Select all

chmod +x /etc/udhcpc.d/90custom
And your are done.

edit: this only works for DHCP received addresses. For static you should put this script in a file in /etc/rc5.d/S99custom (and also set chmod +x)
Member of the Toon Software Collective
hellwich
Starting Member
Starting Member
Posts: 6
Joined: Sat Apr 14, 2018 1:27 am

Re: Static IP on Toon for external control

Post by hellwich »

I've added the script in the specified location, but it seems it is not picked up at boot. Maybe because the udhcpc.d daemon doesn't start on boot (because of the static IP address)?

When I start the 90custom script manually then it is successfully executed and the 2nd DNS server is added to /etc/resolv.conf. Also when I start "udhcpc" it is also successfully executed (2nd DNS server is added to /etc/resolv.con).
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Static IP on Toon for external control

Post by TheHogNL »

hellwich wrote:I've added the script in the specified location, but it seems it is not picked up at boot. Maybe because the udhcpc.d daemon doesn't start on boot (because of the static IP address)?.
Owh.. damn you are right :-)
Member of the Toon Software Collective
hellwich
Starting Member
Starting Member
Posts: 6
Joined: Sat Apr 14, 2018 1:27 am

Re: Static IP on Toon for external control

Post by hellwich »

Is there maybe any other easy way to start the script at boot? :)
Post Reply

Return to “Toon external control”