01.
) "" WL-500gPremium V1 - http://wl500g.info/showpost.php?p=38611&postcount=1.
(WL-500gP), .
BogoMIPS
PHP Code:
system type : Broadcom BCM4704 chip rev 9 pkg 0
processor : 0
cpu model : BCM3302 V0.6
BogoMIPS : 263.78
wait instruction : no
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : no
hardware watchpoint : no
VCED exceptions : not available
VCEI exceptions : not available
unaligned_instructions : 2
dcache hits : 0
dcache misses : 0
icache hits : 0
icache misses : 0
instructions : 0
Code:
nvram set clkfreq=300,150
nvram commit
Code:
flashfs save && flashfs commit && flashfs enable && reboot
. .
:
PHP Code:
BogoMIPS : 299.82
) STP ( )
Code:
nvram set lan_stp=0
nvram commit
Code:
flashfs save && flashfs commit && flashfs enable && reboot
, . .
) SSH- . .. .
Code:
mkdir -p /usr/local/etc/dropbear
dropbearkey -t dss -f /usr/local/etc/dropbear/dropbear_dss_host_key
dropbearkey -t rsa -f /usr/local/etc/dropbear/dropbear_rsa_host_key
mkdir -p /usr/local/sbin/
touch /usr/local/sbin/post-boot
touch /usr/local/sbin/post-firewall
touch /usr/local/sbin/post-mount
touch /usr/local/sbin/pre-mount
touch /usr/local/sbin/pre-shutdown
chmod +x /usr/local/sbin/*
echo "#!/bin/sh" >> /usr/local/sbin/post-boot
echo "dropbear > /dev/null 2>&1" >> /usr/local/sbin/post-boot
Code:
flashfs save && flashfs commit && flashfs enable && reboot
ps . dropbear.
:
PHP Code:
PID Uid VmSize Stat Command
...............................................................
120 admin 468 S dropbear
130 admin SW [kjournald]
134 admin 548 S -sh
137 admin 392 R ps
================================================== ==========
putty.exe . - \putty.exe -ssh -pw [ ] []@[IP] . - 1111, - admin, IP 192.168.1.1 putty.exe putty D:, - D:\Putty\putty.exe -ssh -pw 1111 admin@192.168.1.1
================================================== ==========
) PPTP ( ) - http://wl500g.info/showthread.php?t=14953
Code:
mkdir -p /usr/local/sbin
vi - .
[i], [ESC].
.
:wq, - :q!
() post-firewall
Code:
vi /usr/local/sbin/post-firewall
- [i]
PHP Code:
#!/bin/sh
iptables -t nat -nvL POSTROUTING | grep MASQUERADE | awk '{
"ifconfig "$7" | grep Mask" | getline ip;
split(ip,ip,":"); split(ip[2],ip," ");
split($8,src,"!");
if (src[1]=="") {src="! -s "src[2]} else {src="-s "src[1]};
if ($9=="0.0.0.0/0") {dst=""} else {dst="-d "$9};
system("iptables -t nat -A POSTROUTING -o "$7" "src" "dst" -j SNAT --to-source "ip[1]);
system("iptables -t nat -D POSTROUTING -o "$7" "src" "dst" -j MASQUERADE");
}'
- [ESC]
:wq
Code:
chmod +x /usr/local/sbin/*
Code:
flashfs save && flashfs commit && flashfs enable && reboot
Code:
iptables -t nat -nvL POSTROUTING
:
PHP Code:
Chain POSTROUTING (policy ACCEPT 382 packets, 24727 bytes)
pkts bytes target prot opt in out source destination
257 17919 SNAT all -- * ppp0 !111.111.1.172 0.0.0.0/0 to:213.231.4.172
40 1923 SNAT all -- * vlan1 !172.18.21.54 0.0.0.0/0 to:172.18.21.54
305 14640 SNAT all -- * br0 10.1.1.0/24 10.1.1.0/24 to:10.1.1.1
target - SNAT. MASQUERADE, , .
) () /
pre-boot *
Code:
vi /usr/local/sbin/pre-boot
- [i]
!!! (EET-2EEST,M3.5.0/3,M10.5.0/4). , , .
PHP Code:
#!/bin/sh
TZ="EET-2EEST,M3.5.0/3,M10.5.0/4"
[ "$TZ" != "$(nvram get time_zone)" ] && nvram set time_zone="$TZ"
echo "$TZ" > /etc/TZ
- [ESC]
:wq
Code:
chmod +x /usr/local/sbin/pre-boot
Code:
flashfs save && flashfs commit && flashfs enable && reboot
:
PHP Code:
Kyiv EET-2EEST,M3.5.0/3,M10.5.0/4
Moscow MSK-3MSD,M3.5.0,M10.5.0/3
St.Petersburg MST-3MDT,M3.5.0/2,M10.5.0/3
Kaliningrad EET-2EEST,M3.5.0,M10.5.0/3
Irkutsk IRKT-8IRKST,M3.5.0,M10.5.0/3
Kamchatka PETT-12PETST,M3.5.0,M10.5.0/3
Krasnoyarsk KRAT-7KRAST,M3.5.0,M10.5.0/3
Magadan MAGT-11MAGST,M3.5.0,M10.5.0/3
Novosibirsk NOVT-6NOVST,M3.5.0,M10.5.0/3
Omsk OMST-6OMSST,M3.5.0,M10.5.0/3
Sakhalin SAKT-10SAKST,M3.5.0,M10.5.0/3
Vladivostok VLAT-10VLAST,M3.5.0,M10.5.0/3
Yakutsk YAKT-9YAKST,M3.5.0,M10.5.0/3
Yekaterinburg YEKT-5YEKST,M3.5.0,M10.5.0/3
Minsk EET-2EEST,M3.5.0,M10.5.0/3
Riga EET-2EEST,M3.5.0/3,M10.5.0/4
Tallinn EET-2EEST-3,M3.5.0/03:00:00,M10.5.0/04:00:00
Baku AZT-4AZST,M3.5.0/4,M10.5.0/5
Yerevan AMT-4AMST,M3.5.0,M10.5.0/3
Ashgabat TMT-5
Ashkhabad TMT-5
Samarkand UZT-5
Tashkent UZT-5
Tbilisi GET-4
Tel_Aviv IDDT
Ulan_Bator ULAT-8
Bishkek KGT-6
* /usr/local/sbin/pre-boot - , ,
, flashfs
/etc /usr/etc.