Lightyear

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: Strange behaviour after Auto Updadate of Bugfix 23320 #53845
    Lightyear
    Member

    Normally, I am very respectful of code I don’t quite understand. In this case, I was forced to investigate because for me Zeroshell is mission-critical and I could not wait for a patch.

    So, you have been warned, continue reading at your own risk 😐

    Perhaps the best bet would be to add

    chmod 644 /root/kerbynet.cgi/scripts/autoupdater

    to the pre boot script.
    Of course, this would stop all autoupdates, but I really can’t say what unwanted effects it would also bring.
    In any case, better try it with a disposable backup πŸ˜‰

    in reply to: Strange behaviour after Auto Updadate of Bugfix 23320 #53843
    Lightyear
    Member

    In the meanwhile you can ssh to zeroshell and go to the shell prompt (option S)
    Then: cd /var/register/system/AutoUpdate/pkgs/
    There it should be directory 23321 with the troublesome patch. Rename it to anything lesser than 23320:

    mv 23321 23319

    Sadly I don’t remember if I erased 23320; I believe I didn’t, but if necessary, you could do

    rm -rdf 23320

    Then exit the shell prompt and log in via the web interface. Now you can happily reinstall 23320.

    Just in case 23321 tries to make a comeback, let’s make a file with the same name.
    Go back to the shell prompt and cd /var/register/system/AutoUpdate/pkgs/
    Then,

    touch 23321

    And, to be on the safe side, make it unwritable at least as long as it is not chmodded:

    chmod 444 23321

    Of course, instead of renaming you could erase 23321. I believe it should work, but I really don’t know.

    Hope this helps, it worked for me.

    in reply to: Version 3.3.2 httpd not starting #53739
    Lightyear
    Member

    Went back to 3.2.1 and it gave the same error.
    Further investigation determined that the pendrive with the configuration has some errors and the file /Database/var/register/system/ssl/ForceHTTPS was missing.
    Very sorry for the mistake 😳 . Perhaps it may be of help to someone, though.
    Anyway, ZS rocks! πŸ˜€

    in reply to: NetBalancer Bug in version 3.3.2 #53701
    Lightyear
    Member

    Same behavior here. Going back to 3.2.1
    Thank you erick06fr for your thorough work! Saved me a lot of time!

    in reply to: Bridging 2 LANs [Solved] #52597
    Lightyear
    Member

    Restarting did the trick. When Zeroshell came back, all was fine.

    in reply to: Multiple DynDns #48756
    Lightyear
    Member

    No need to bother Ivan; here follows the modified script 8)

    #!/bin/sh
    # Script made by Ivan Baldo to permit multiple dyndns accounts in ZeroShell

    Host_PPP0="http_address_of_dyndns_account_1"
    Host_PPP1="http_address_of_dyndns_account_2"

    actualiza ()
    {
    Interfaz="$1"
    Host="$2"
    Usuario="$3"
    Contrasena="$4"
    IP=$(ifconfig $Interfaz 2>/dev/null | awk 'NR==2 {print $2}' | grep '.*..*..*..*' | cut -d: -f2)
    touch /tmp/dyndns.ipviej.$Interfaz
    IPViej="$(cat /tmp/dyndns.ipviej.$Interfaz)"
    Actualizar="no"
    if [ "$IP" != "" ]; then
    if [ "$IP" != "$IPViej" ]; then
    Actualizar="si"
    fi
    fi
    if [ "$Actualizar" = "no" ]; then
    return
    fi
    if [ -e /tmp/dyndns.deshabilitado.$Interfaz ]; then
    return
    fi
    logger -t DDNS "Actualizando $Host a $IP de interfaz $Interfaz."
    if wget "--bind-address=$IP" -t 3 -w 20 -o /tmp/dyndns.error.$Interfaz -O /tmp/dyndns.resultado.$Interfaz
    "http://$Usuario:$Contrasena@members.dyndns.org/nic/update?system=dyndns&hostname=$Host&mx=$Host&myip=$IP"
    then
    logger -t DDNS "==> $(cat /tmp/dyndns.resultado.$Interfaz)"
    if grep -q "!yours|notfqdn|abuse|nohost|badagent|badauth|badsys|dnserr|numhost|911|!donator"
    /tmp/dyndns.resultado.$Interfaz
    then
    logger -t DDNS "==> Hubo un error reportado por DynDNS, luego de solucionar el problema borre el archivo /tmp/dyndns.deshabilitado.$Interfaz!"
    touch /tmp/dyndns.deshabilitado.$Interfaz
    else
    echo "$IP" >/tmp/dyndns.ipviej.$Interfaz
    fi
    else
    logger -t DDNS "==> Error al conectarse con DynDNS:"
    grep -v " => " /tmp/dyndns.error.$Interfaz | logger -t DDNS
    fi
    }

    while true; do
    actualiza ppp0 $Host_PPP0 username_1 password_1
    actualiza ppp1 $Host_PPP1 username_2 password_2
    sleep 60
    done

    Of course, to provide for another DDNS service, it would be neccesary to know these other service quirks and tricks.
    And thank you for the tip, ppalias! I do hope you have had a very good 2010 beginning.

    in reply to: Multiple DynDns #48754
    Lightyear
    Member

    I currently have two dynamic IP connections, one ADSL and one 3G.
    Ivan Baldo, fine programmer and friend extraordinaire, made a script so ZeroShell updates both dynamic IPs.
    He called it ddns2.nuestro (we are Spanish speakers) and placed it in the /Database directory.
    Then he added the following command to the ZeroShell preboot script:

    cp -v /Database/ddns2.nuestro /root/kerbynet.cgi/scripts/ddns2

    so ddns2.nuestro is what ZeroShell wil run when updating dynamic IPs.
    It has worked without a glitch for more than 3 months now, and I think it is very easy to modify for more than 2 dyndns accounts, or for another DDNS service.
    Here it goes:

    #!/bin/sh

    # Script made by Ivan Baldo to permit multiple dyndns IP updating in ZeroShell

    Usuario=”your_dyndns_user_name”
    Contrasena=”your_dyndns_password”
    Host_PPP0=”http_address_of_dyndns_account_1″
    Host_PPP1=”http_address_of_dyndns_account_2″

    actualiza ()
    {
    Interfaz=”$1″
    Host=”$2″
    IP=$(ifconfig $Interfaz 2>/dev/null | awk ‘NR==2 {print $2}’ | grep ‘.*..*..*..*’ | cut -d: -f2)
    touch /tmp/dyndns.ipviej.$Interfaz
    IPViej=”$(cat /tmp/dyndns.ipviej.$Interfaz)”
    Actualizar=”no”
    if [ “$IP” != “” ]; then
    if [ “$IP” != “$IPViej” ]; then
    Actualizar=”si”
    fi
    fi
    if [ “$Actualizar” = “no” ]; then
    return
    fi
    if [ -e /tmp/dyndns.deshabilitado.$Interfaz ]; then
    return
    fi
    logger -t DDNS “Actualizando $Host a $IP de interfaz $Interfaz.”
    if wget “–bind-address=$IP” -t 3 -w 20 -o /tmp/dyndns.error.$Interfaz -O /tmp/dyndns.resultado.$Interfaz
    http://$Usuario:$Contrasena@members.dyndns.org/nic/update?system=dyndns&hostname=$Host&mx=$Host&myip=$IP”
    then
    logger -t DDNS “==> $(cat /tmp/dyndns.resultado.$Interfaz)”
    if grep -q “!yours|notfqdn|abuse|nohost|badagent|badauth|badsys|dnserr|numhost|911|!donator”
    /tmp/dyndns.resultado.$Interfaz
    then
    logger -t DDNS “==> Hubo un error reportado por DynDNS, luego de solucionar el problema borre el archivo /tmp/dyndns.deshabilitado.$Interfaz!”
    touch /tmp/dyndns.deshabilitado.$Interfaz
    else
    echo “$IP” >/tmp/dyndns.ipviej.$Interfaz
    fi
    else
    logger -t DDNS “==> Error al conectarse con DynDNS:”
    grep -v ” => ” /tmp/dyndns.error.$Interfaz | logger -t DDNS
    fi
    }

    while true; do
    actualiza ppp0 $Host_PPP0
    actualiza ppp1 $Host_PPP1
    sleep 60
    done

    Unfortunately, the forum editor does not allow script formatting. I hope it is readable all the same.
    I believe also it’s easy to translate the Spanish parts if need be, but in any case I will be following this thread so feel free to ask for translation.

    I hope I didn’t break any forum rule copying the script here, but I feel it really can be of help to someone, and I do not have any place to hang it for downloading πŸ™ .
    ZeroShell rules! πŸ˜€

    in reply to: Best way to tranfer files to ZeroShell? #47569
    Lightyear
    Member

    What works for me is ssh-ing to ZeroShell and then go to the ZeroShell system prompt. From there you can scp to/from anywhere in your network that has password authentication.
    And, if you want key authentication, just scp the keys to ZeroShell.
    This is what I use to backup ZeroShell to a local server. And what I used to bring Joe to ZeroShell.
    Admittedly, mine is a Linux-only network, but from what I have heard from the Mac, it should be a piece o’cake.

    Hth.

    in reply to: BAck up weekly #48960
    Lightyear
    Member

    Never tried FTP. What i’m doing is using scp to back up to a local machine.

    Hth.

    in reply to: Weird port forwarding problem… #49310
    Lightyear
    Member

    Thank you for your reply, I wasn’t expecting one so fast in Christmas πŸ™‚
    Yes, I have a virtual server for each connection, and I route all P2P via 3g modem (ppp1). That is working fine.
    What leaves me at a loss is that even if I put a balancing rule to send all the traffic (no protocol filter, no port filter, only “from” address filter) that comes from the machine running MLDonkey via ppp1, MLDonkey keeps using the wrong IP address (the one given by the ISP to ppp0, adsl connection) to make a port test.
    This happens roughly 60% of the time (the weight of the adsl gateway).
    Anyway, I have come to a solution of sorts setting MLDonkey to discard connections with lowID. Crude but effective.
    I would have liked to know what’s going on, though. πŸ˜•
    But it’s a very minor point. ZeroShell rules! πŸ˜€

    Merry Christmas to you, ppalias!

    in reply to: 3G USB Huawei E180 help me!!! #49217
    Lightyear
    Member
    in reply to: Weird port forwarding problem… #49308
    Lightyear
    Member

    My problem is slightly different. I’m using MLDonkey and via Virtual servers/Net balancing it’s working fairly well.
    The only thing to improve is that there’s no way to know which address will ZeroShell return when MLDonkey makes a port test. So, it’s fairly common for MLDonkey to test the wrong address and get lowID.
    The connections are dynamic IP, so there is no way to know the addresses beforehand.
    I believe it is a different problem from that of the previous poster, but I’m not sure.
    Thank you in advance.

Viewing 12 posts - 1 through 12 (of 12 total)