среда, 31 августа 2011 г.

Прошивка TP-Link TL-WR841ND

TFTP install

Beware that this installation method needs a TTL level serial console and a working TFTP server and should not be attempted unless you have experience with this sort of thing or are eager to learn :)
This is taken more or less verbatim from https://forum.openwrt.org/viewtopic.php?id=24203, thanks to dl3daz.
- Download http://downloads.openwrt.org/backfire/10.03/ar71xx/openwrt-ar71xx-tl-wr841nd-v5-squashfs-factory.bin to your TFTP server. - Hook your routers WAN ethernet port up to your network - Hook up the serial console as explained in the section "serial console" and do the "tpl" trick to get console access - Now we need to set router and server IP addresses (here named ROUTERIP and SERVERIP, substitute these with the real IP addresses). Type in the console:
setenv ipaddr ROUTERIP
setenv serverip SERVERIP
printenv
- Double check that the output of printenv lists the IP addresses you just set. Now we can load the firmware over TFTP with "tftpboot 0x80000000 openwrt-ar71xx-tl-wr841nd-v5-squashfs-factory.bin":
ar7240> tftpboot 0x80000000 openwrt-ar71xx-tl-wr841nd-v5-squashfs-factory.bin
Using eth0 device
TFTP from server 192.168.32.253; our IP address is 192.168.32.246
Filename 'openwrt-ar71xx-tl-wr841nd-v5-squashfs-factory.bin'.
Load address: 0x80000000
Loading: checksum bad
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################################
done
Bytes transferred = 3932160 (3c0000 hex)
- Note the "3c0000" in the last line (your number may differ). Now execute the following commands, if necessary replacing 3c0000 with the number you got from tftpboot:
ar7240> erase 0x9f020000 +0x3c0000
...
ar7240> cp.b 0x80000000 0x9f020000 0x3c0000
ar7240> bootm 0x9f020000

четверг, 18 августа 2011 г.

Postfix. Не уходят письма во внеший мир. Очистка цепочек

 Проверка цепочки

    tail -f /var/log/mail.log

    postqueue -p
    
 

 Очистить все Postfix mail queue

Очистить все цепочки для Postfix сожно команду в одну строку:
~# for i in `mailq|grep '@' |awk {'print $1'}|grep -v '@'`; do postsuper -d $i ; done
Либо же:
postsuper -d ALL
или:

postsuper -d ALL deferred tail -f /var/log/mail.log

 Не уходят письма во внеший мир.

ispCPhosting:~# tail -f /var/log/mail.log

Aug 19 03:06:05 hosting postfix/qmgr[2461]: 6D3D3160061: from=, size=2953, nrcpt=1 (queue active)
Aug 19 03:06:05 hosting postfix/smtpd[3084]: disconnect from localhost[127.0.0.1]
Aug 19 03:06:08 hosting postfix/smtp[3087]: connect to e.mx.mail.yahoo.com[67.195.168.230]:25: Connection refused
Aug 19 03:06:08 hosting postfix/smtp[3087]: connect to b.mx.mail.yahoo.com[74.6.136.65]:25: Connection refused
Aug 19 03:06:08 hosting postfix/smtp[3087]: 6D3D3160061: to=, relay=none, delay=3, delays=0.2/0.01/2.8/0, dsn=4.4.1, status=deferred (connect to k.mx.mail.yahoo.com[98.139.54.60]:25: Connection refused)

На хостинге в сети провайдера:

ispCPhosting:~# telnet k.mx.mail.yahoo.com 25Trying 98.139.54.60...
telnet: Unable to connect to remote host: Connection refused

У провайдера на шлюузе во внешний мир:

gatewayISP:~# telnet k.mx.mail.yahoo.com 25
Trying 98.139.54.60...
Connected to k.mx.mail.yahoo.com.
Escape character is '^]'.
220 mta1224.mail.ac4.yahoo.com ESMTP YSmtp service ready
Connection closed by foreign host. 

Отсюда делаем вывод что закрыт 25 порт на выход во внешний мир из внутренней сети провайдера. 

Провайдеру необходимо у себя на шюзе добавить правила:

iptables -I FORWARD -d 195.xxx.xxx.130  -o eth4.294 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 195.xxx.xxx.130  -o eth4.295 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -s 195.xxx.xxx.130  -o eth4.294 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -s 195.xxx.xxx.130  -o eth4.295 -p tcp --dport 25 -j ACCEPT

 

Изменить email  по умолчанию для администратора панели ispCP Omega можно в файле:

/etc/ispcp/ispcp.conf