AutoStartUp Question !

  • hi All
    i Have problem with resolv.conf


    So i Create a script for changing the dns server (and send it to /etc/initd and symlinked to rc3.d)
    and also a file named resolv.conf in (/usr)


    Code: resolv.conf (/usr)
    # Generated by Connection Manager
    nameserver 8.8.8.8
    nameserver ::1



    and now i can start script manually and working correct


    but it doesn't start by boot :sleeping_face:

    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

  • UserScripts plugin has a feature to start scripts at boot time. Or start reading systemd service documentation and look at enigma2 pre script and service as an example.

  • @gutemine


    i cant start script throw userscript, but from webadmin all the things were ok


    and just another question WHY I Cant Change resolv.conf manually - on Every other linux based systems it can change also oe2.0

    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

    Einmal editiert, zuletzt von Shahrestani ()

  • @Ghost
    dear ghost with dns settings on network menu nothing change or happend on resolv.conf , give a try :winking_face:
    now im working for two days on it


    when using openvpn we connect to other server . but the dns is local (127.0.0.1)(because of resolv.conf) -
    and then if your goverment block some dns's you cant connect to unless dns getting change


    see the picture below please - and now dns is local yet

    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

  • @Ghost thanks for your support


    its not matter who's first ,
    if vpn starts first and then dns ---> dns block happens on blocked dns
    if dns comes first and then vpn ----> all the traffics throw dns block (blocked and unblocked)


    there's only one way left -->resolve.conf (because resolver cant work on local for blocked dns)


    it would better change manully like all other unix based devices
    . i love 2.5 & ilove dreamboxes but its a bug

    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

  • As far as I can see, the bug is that you are not using systemd or connman :winking_face: Executing scripts alongside those tools will have unforeseen side effects.


    So please check if you can switch to systemd with your VPN service and how to set DNS in connmanctl.

    so long
    m0rphU

  • @morphu
    hi mr morphu
    this script is working after enigma2 boot very well , the main problem is 'Everythings gone after full restart'
    this sittuation happens only on2.5 - on ubuntu you can change the resolv.conf and always stay as you wish


    ithink all the people cant do such a things with systemctl
    and i don't know what to do with that at all

    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

  • finally done but not with DreamOS because somethings changed after 2.0 and i hope dmm make it easier


    i do it with RouterOS . :grinning_squinting_face:
    i just bought a mikrotik (hap lite) routerboard for 25$


    For anyone whom are in countries with blocked dns's its the better way than Dreamos :thumbs_up:

    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

  • yes, for sure they changed something. They use systemd! But you were already told that...

    thanks dre - i know about systemd- but not all of the command formats .
    and no one told about the which command should i use for this reason
    and icant find it elsewhere .....
    command for changing dns addresses !
    if you know could you please type it here ?


    thanks in advance

    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

  • man systemd-network would have told you how to do it correctly ... otherwise systemd will always get it's own will ... as you found out yourself ...


    Even ip addr ... in a script would have worked at least better than trying to change configs ... and man ip would have also worked :face_with_tongue:

  • dear @gutemine
    manual ip is old trick and doesnt work either on many sites , government bought a router from great firewall of china (GFW)& Golden Shield Project years ago
    they spend millions of dollar to do it perfectly (Ip of this router is 10.10.34.34) and they called this (DNS poisoning) :upside_down_face:
    many sites requires dns passthrough but it should happen at the same time


    we can't change ip on DM and change DNS of router ,, i should do it at the same time on one platform(router or DM)but as you know DM isn't friendly with DNS changing (on oe 2.5 imean)
    and now with mikrotik i tell the DM which DNS i have
    (he learn about the dns's ) :grinning_squinting_face:


    anyway thanks to you and god saves you for DM


    amirali.sh


    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

  • we can't change ip on DM and change DNS of router ,, i should do it at the same time on one platform(router or DM)but as you know DM isn't friendly with DNS changing (on oe 2.5 imean)

    Sorry Shahrestani but I do not know what your problem is and why you write the above conclusion, which is wrong.
    That you are not able to change DNS in OE 2.5 is what I called: due to operator trouble. With other words you must be making one or more mistakes.
    For sure you can in OE 2.5 change DNS and IP (your receiver should use/have) and thus (using your words): OE 2.5. is friendly with changing DNS.


    In OE 2.5 you can through the Menu (settings-network-network settings) change the DNS and also add/delete a second DNS. I just tried for you to change the DNS I normally use (which is the ip of my router) to (the google ones): 8.8.8.8 and also added a second one (8.8.4.4).


    Go to Network settings, select the type of connection (wifi/wired) and click at DNS (probably blue button) change the DNS, add/change the second one. Press OK and than do not forget to "reload" (probably red button). That's all. I just did it and after a complete reboot the new DNS's are still effective.

  • dear @ni_hao
    hi
    I know what you say but it's not working thus resolv.conf changed . all the things is in hand by resolver
    on2.5 you can change it by menu as i described in post #5 but nothing happened to resolver. it's only show us its changed but in real means it's not


    you should give a try . change it on menu to google dns's and restart after that check the resolv.conf (/etc) it says only you're on local (127.0.0.1)

    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

  • you have only to restart the conmann.service after changing the DNS server settings


    Code
    systemctl restart connman.service

    the DNS settings are on file /mnt/var/lib/connman/ethernet_000934xxxxxx_cable/settings (xxxxxx is the alias for the MAC address of the NIC)
    it's possible to change the settings without the GUI over the CLI there

    Gruß Fred

    Die Dreambox ist tot, es lebe die Dreambox

  • @Fred Bogus Trumper


    ConnMan writes 127.0.0.1 as nameserver in the
    /etc/resolv.conf, as i say. And it resolves domains like google.com,
    but it doesn't resolve subdomains in the local network and when some domains has a blocked dns the problems happend .


    i think mr gutemine tried this one because i think he is agree with that

    DM900-1TB HDD-FBC-S2X-Inverto120&Inverto100


    amirali.sh

  • changes in /etc/resolv.conf or /var/run/resolv.conf will not be considered in DreamOS, you have to add the nameservers in the conmann settings if you want to use a script to do that

    Gruß Fred

    Die Dreambox ist tot, es lebe die Dreambox