Static IP on Toon for external control

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

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Static IP on Toon for external control

Postby said0066 » Fri Feb 22, 2019 8:58 pm

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.
said0066
Starting Member
Starting Member
 
Posts: 13
Joined: February 2019

Re: Static IP on Toon for external control

Postby marcelr » Fri Feb 22, 2019 9:15 pm

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.
marcelr
Global Moderator
Global Moderator
 
Posts: 1070
Joined: May 2012
Location: Ehv

Re: Static IP on Toon for external control

Postby richardklasens » Sun Feb 24, 2019 3:45 pm

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!
richardklasens
Starting Member
Starting Member
 
Posts: 15
Joined: February 2019

Re: Static IP on Toon for external control

Postby TheHogNL » Sun Feb 24, 2019 5:20 pm

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
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1055
Joined: August 2017

Re: Static IP on Toon for external control

Postby marcelr » Sun Feb 24, 2019 5:51 pm

... 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 ...
marcelr
Global Moderator
Global Moderator
 
Posts: 1070
Joined: May 2012
Location: Ehv

Re: Static IP on Toon for external control

Postby richardklasens » Mon Feb 25, 2019 6:06 pm

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?
richardklasens
Starting Member
Starting Member
 
Posts: 15
Joined: February 2019

Re: Static IP on Toon for external control

Postby TheHogNL » Mon Feb 25, 2019 6:18 pm

Only if your mistake doesn't also affect the ethernetport config :-)
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1055
Joined: August 2017

Re: Static IP on Toon for external control

Postby richardklasens » Mon Feb 25, 2019 6:39 pm

In that case.. do not try to make a mistake :lol:
richardklasens
Starting Member
Starting Member
 
Posts: 15
Joined: February 2019

Re: Static IP on Toon for external control

Postby TheHogNL » Mon Feb 25, 2019 6:43 pm

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
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1055
Joined: August 2017

Re: Static IP on Toon for external control

Postby richardklasens » Thu Feb 28, 2019 1:12 am

Thnx for the info! Worked like a charm! :D
richardklasens
Starting Member
Starting Member
 
Posts: 15
Joined: February 2019

Re: Static IP on Toon for external control

Postby hellwich » Sat Jul 27, 2019 11:19 pm

Worked like a charm, but how to add a second static nameserver?
hellwich
Starting Member
Starting Member
 
Posts: 6
Joined: April 2018

Re: Static IP on Toon for external control

Postby TheHogNL » Sun Jul 28, 2019 8:09 am

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
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1055
Joined: August 2017

Re: Static IP on Toon for external control

Postby hellwich » Sun Jul 28, 2019 9:48 am

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).
hellwich
Starting Member
Starting Member
 
Posts: 6
Joined: April 2018

Re: Static IP on Toon for external control

Postby TheHogNL » Sun Jul 28, 2019 1:55 pm

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
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1055
Joined: August 2017

Re: Static IP on Toon for external control

Postby hellwich » Sun Jul 28, 2019 3:13 pm

Is there maybe any other easy way to start the script at boot? :)
hellwich
Starting Member
Starting Member
 
Posts: 6
Joined: April 2018

Next

Return to Toon external control

Who is online

Users browsing this forum: No registered users and 1 guest