1

(1,423 odpowiedzi, napisanych Oprogramowanie / Software)

Przeanalizowałem /etc/init.d/set_kernel_timezone i wydaje mi się, że tu dodawana jest tylko druga linijka, nie wiem gdzie jest źródło trzeciej i czwartej linijki, które właśnie chcę zmienić.

#!/bin/sh /etc/rc.common
START=30

start()
{
    /usr/bin/set_kernel_timezone
    mkdir -p /etc/crontabs
    touch /etc/crontabs/root
    cat /etc/crontabs/root | grep -v "set_kernel_timezone" > /tmp/new_cron
    echo '0,1,11,21,31,41,51 * * * * /usr/bin/set_kernel_timezone >/dev/null 2>&1' >> /tmp/new_cron
    mv /tmp/new_cron /etc/crontabs/root
    /etc/init.d/cron enable

    #only restart cron if it is currently running
    #since we initialize this before cron, this will
    #make sure we don't start cron twice at boot
    cron_active=$(ps | grep "crond" | grep -v "grep" )
    if [ -n "$cron_active" ] ; then
        /etc/init.d/cron restart
    fi
   
}

stop()
{
    if [ -e /etc/crontabs/root ] ; then

        cat /etc/crontabs/root | grep -v "set_kernel_timezone" >> /tmp/new_cron
        mv /tmp/new_cron /etc/crontabs/root
        cron_active=$(ps | grep "crond" | grep -v "grep" )
        if [ -n "$cron_active" ] ; then
            /etc/init.d/cron restart
        fi
    fi
}

2

(1,423 odpowiedzi, napisanych Oprogramowanie / Software)

Próbowałem to zmienić, jednak bez rezultatu. Jestem jeszcze zielony w temacie.
Byłbym wdzięczny za gotowiznę smile

3

(1,423 odpowiedzi, napisanych Oprogramowanie / Software)

Wgrałem od nowa Gargoyle i nadal nie mogę zmodyfikować pliku /etc/crontabs/root.

edytuję i zapisuję plik:

root@Gargoyle:~$ vi /etc/crontabs/root
*/3 * * * * /bin/3gtester
0,1,11,21,31,41,51 * * * * /usr/bin/set_kernel_timezone >/dev/null 2>&1
0 */1 * * * date -u  +"%Y.%m.%d-%H:%M:%S" >/usr/data/time_backup
0 */1 * * * /tmp/do_bw_backup.sh

sprawdzam zawartość i restartuję crona:

root@Gargoyle:~$ cat /etc/crontabs/root
*/3 * * * * /bin/3gtester
0,1,11,21,31,41,51 * * * * /usr/bin/set_kernel_timezone >/dev/null 2>&1
0 */1 * * * date -u  +"%Y.%m.%d-%H:%M:%S" >/usr/data/time_backup
0 */1 * * * /tmp/do_bw_backup.sh
root@Gargoyle:~$ /etc/init.d/cron restart

wykonuje reboot i po restarcie otrzymuję dokładnie to samo co w pliku przed modyfikacją:

root@Gargoyle:~$ cat /etc/crontabs/root
*/3 * * * * /bin/3gtester
0,1,11,21,31,41,51 * * * * /usr/bin/set_kernel_timezone >/dev/null 2>&1
0 0,4,8,12,16,20 * * * date -u  +"%Y.%m.%d-%H:%M:%S" >/usr/data/time_backup
0 0,4,8,12,16,20 * * * /tmp/do_bw_backup.sh
root@Gargoyle:~$

Po wykonaniu wielu prób zauważyłem, że mogę dopisywać, kasować i modyfikować wszystkie linie oprócz:
0,1,11,21,31,41,51 * * * * /usr/bin/set_kernel_timezone >/dev/null 2>&1
0 0,4,8,12,16,20 * * * date -u  +"%Y.%m.%d-%H:%M:%S" >/usr/data/time_backup
0 0,4,8,12,16,20 * * * /tmp/do_bw_backup.sh

po restarcie system zawsze przywraca je do pierwotnej wersji, czy można to zmienić?

4

(1,423 odpowiedzi, napisanych Oprogramowanie / Software)

Zmieniłem plik /etc/crontabs/root, aby częściej zapisywały mi się statystyki łącza, zrobiłem restart crona.
Wszystko uruchamia się zgodnie z definicjami w cronie do momentu restartu routera.
Po restarcie przywraca mi się pierwotny plik /etc/crontabs/root. Co powinienem jeszcze zmodyfikować?
Dziękuję za wszystkie podpowiedzi.

5

(1,423 odpowiedzi, napisanych Oprogramowanie / Software)

Zainstalowałem na moim mr-3420 w celach edukacyjnych projekt "blokada". Jak mogę zmienić domyślne hasło do panelu administracyjnego?

6

(47 odpowiedzi, napisanych Oprogramowanie / Software)

Moim dostawcą ISP jest lokalna firma, dostarcza internet do około 300 użytkowników bezprzewodowo i przewodowo i wszystkim domyślnie ustawia TTL na 1.
Plusem jest to, że mimo iż jestem klientem bezprzewodowym, mam bardzo niski ping i stabilny transfer i bez problemu używam VOIPa.
Jeszcze raz dziękuję za pomoc i pozdrawiam.

7

(47 odpowiedzi, napisanych Oprogramowanie / Software)

Po zainstalowaniu pakietu od Ciebie podbicie ttl działa !!!
Wielkie dziękuję za pomoc, bez której mój router byłby praktycznie bezużyteczny.

Myślę, że funkcja ustawiania TTL bezpośrednio w GUI byłaby dużym ułatwieniem dla początkujących użytkowników Gargoyle.

8

(47 odpowiedzi, napisanych Oprogramowanie / Software)

Wygląda na to, że nie mam obsługi TTL.

root@Gargoyle:~$ iptables -j TTL -help
iptables v1.4.6

Usage: iptables -[AD] chain rule-specification [options]
       iptables -I chain [rulenum] rule-specification [options]
       iptables -R chain rulenum rule-specification [options]
       iptables -D chain rulenum [options]
       iptables -[LS] [chain [rulenum]] [options]
       iptables -[FZ] [chain] [options]
       iptables -[NX] chain
       iptables -E old-chain-name new-chain-name
       iptables -P chain target [options]
       iptables -h (print this help information)

Commands:
Either long or short options are allowed.
  --append  -A chain            Append to chain
  --delete  -D chain            Delete matching rule from chain
  --delete  -D chain rulenum
                                Delete rule rulenum (1 = first) from chain
  --insert  -I chain [rulenum]
                                Insert in chain as rulenum (default 1=first)
  --replace -R chain rulenum
                                Replace rule rulenum (1 = first) in chain
  --list    -L [chain [rulenum]]
                                List the rules in a chain or all chains
  --list-rules -S [chain [rulenum]]
                                Print the rules in a chain or all chains
  --flush   -F [chain]          Delete all rules in  chain or all chains
  --zero    -Z [chain [rulenum]]
                                Zero counters in chain or all chains
  --new     -N chain            Create a new user-defined chain
  --delete-chain
            -X [chain]          Delete a user-defined chain
  --policy  -P chain target
                                Change policy on chain to target
  --rename-chain
            -E old-chain new-chain
                                Change chain name, (moving any references)
Options:
[!] --proto     -p proto        protocol: by number or name, eg. `tcp'
[!] --source    -s address[/mask][...]
                                source specification
[!] --destination -d address[/mask][...]
                                destination specification
[!] --in-interface -i input name[+]
                                network interface name ([+] for wildcard)
--jump -j target
                                target for rule (may load target extension)
  --goto      -g chain
                              jump to chain with no return
  --match       -m match
                                extended match (may load extension)
  --numeric     -n              numeric output of addresses and ports
[!] --out-interface -o output name[+]
                                network interface name ([+] for wildcard)
  --table       -t table        table to manipulate (default: `filter')
  --verbose     -v              verbose mode
  --line-numbers                print line numbers when listing
  --exact       -x              expand numbers (display exact values)
[!] --fragment  -f              match second or further fragments only
  --modprobe=<command>          try to insert modules using this command
  --set-counters PKTS BYTES     set the counter during insert/append
[!] --version   -V              print package version.

Co i skąd doinstalować, żeby mieć obsługę ttl?
Szukałem podpowiedzi na tym forum, jednak z racji tego że jestem jeszcze laikiem nie potrafię sobie z tym poradzić.

9

(47 odpowiedzi, napisanych Oprogramowanie / Software)

Zrobiłem wszystko zgodnie ze wskazaną instrukcją, jednak otrzymuję błąd:

root@Gargoyle:~$ opkg update
Downloading http://ecco.selfip.net/backfire/ar71xx/ … ckages.gz.
Inflating http://ecco.selfip.net/backfire/ar71xx/ … ckages.gz.
Updated list of available packages in /var/opkg-lists/eko1.
Downloading http://downloads.openwrt.org/backfire/1 … ackages/Pa        ckages.gz.
Inflating http://downloads.openwrt.org/backfire/1 … kages/Pack        ages.gz.
Updated list of available packages in /var/opkg-lists/packages.
root@Gargoyle:~$ opkg install kmod-ipt-ipopt iptables-mod-ipopt
Package kmod-ipt-ipopt (2.6.32.27-1) installed in root is up to date.
Package iptables-mod-ipopt (1.4.6-3) installed in root is up to date.
root@Gargoyle:~$ echo "iptables -t mangle -I PREROUTING 1 -i eth0.1 -j TTL --ttl
-inc 1" >> /etc/firewall.user
root@Gargoyle:~$ /etc/init.d/firewall restart
Loading defaults
Loading synflood protection
Adding custom chains
Loading zones
Loading forwardings
Loading redirects
Loading rules
Loading includes
iptables v1.4.6: unknown option `--ttl-inc'
Try `iptables -h' or 'iptables --help' for more information.
Optimizing conntrack
Loading interfaces
root@Gargoyle:~$

Co źle robię?

Kupiłem router TP-LINK MR-3420 i wgrałem najnowsze Gargoyle. Jak mogę podbić ttl o jeden, gdyż mój dostawca blokuje dostęp do sieci także ttl-em?