PPTP Client Auto Reconnect Note 
# Create vpn Connection
pptpsetup --create vpnhk --server x.x.x.x --username vpn-user-name --password vpn-password --encrypt --start
pptpsetup --create vpnlw --server y.y.y.y --username vpn-user-name --password vpn-password --encrypt --start
pptpsetup --create vpnfw --server z.z.z.z --username vpn-user-name --password vpn-password --encrypt --start

# Manual Connect VPN
pon vpnhk updetach
pon vpnlw updetach
pon vpnfw updetach

# Manual Disconnect All VPN
poff -a

# Manual Route Add
route add -net 192.168.90.0 netmask 255.255.255.0 dev ppp0
route del -net 192.168.90.0 netmask 255.255.255.0

# Setup Boot up ppp Auto Connection
/etc/network/interface
auto vpnhk
iface vpnhk inet ppp
provider vpnhk

auto vpnlw
iface vpnlw inet ppp
provider vpnlw

auto vpnhk
iface vpnhk inet ppp
provider vpnlw

# added by pptpsetup
/etc/ppp/chap-secrets
joehome vpnhk "EV2340~9" 192.168.45.40
joehome vpnfw "EV2340~9" 192.168.45.60
joehome vpnlw "EV2340~9" 192.168.45.70

# Auto pptp Re-connection modify Sample
/etc/ppp/peers/vpnfw
# written by pptpsetup
pty "pptp 119.145.34.2 --nolaunchpppd"
lock
noauth
nobsdcomp
nodeflate
name joehome
remotename vpnfw
ipparam vpnfw
require-mppe-128
maxfail 0
persist

# Install quagga Dynamic Route tools
apt-get install quagga

# Dynamic Route Configuration, Need install quagga
/etc/quagga/daemons
zebra=yes
bgpd=no
ospfd=no
ospf6d=no
ripd=yes
ripngd=no
isisd=no
babeld=no

# Dynamic Route Table setting, Need install quagga
/etc/quagga/zebra.conf
hostname AnyName
password YourPassword
enable password YourPassword
ip route 192.168.1.0/24 192.168.40.1
ip route 192.168.40.0/24 192.168.40.1
ip route 192.168.60.0/24 192.168.60.1
ip route 192.168.70.0/24 192.168.70.1
ip route 192.168.90.0/24 192.168.40.1

# Dynamic Route Restart
/etc/init.d/quagga restart


[ 發表回應 ] ( 6預覽 )   |  常註連結  |   ( 2.8 / 95 )
<window root>system32 missing or corrupt [Solved/Closed] 
Source : http://ccm.net/forum/affich-109031-wind ... or-corrupt

If you have a black screen with a messages like those :

>Windows could not start because the following file is missing or corrupt:
\WINDOWS\SYSTEM32\CONFIG\SYSTEM

>Windows NT could not start because the below file is missing or corrupt:
X:\WINNT\System32\Ntoskrnl.exe

>Windows NT could not start because the below file is missing or corrupt:
X:\WINNT\System32\HAL.dll

>NTLDR is Missing
Press any key to restart

>Invalid boot.ini
Press any key to restart

Repair with XP CD :
1. Boot with CDROM
2. Enter the installer XP CD
3. Press R if like this :
Image

4. Press 1(or the other that show the installation drive) and enter the admin ]
Image

5. Type Like This :
> C: CD ..
> C: ATTRIB –H C:boot.ini
> C: ATTRIB –S C:boot.ini
> C: ATTRIB –R C:boot.ini
> C: del boot.ini
> C: BOOTCFG /Rebuild

6. After Rebuild finish type this:
C: CHKDSK /R /F kemudian
C: FIXBOOT
“Sure you want to write a new bootsector to the partition C: ?” press “Y”
C: EXIT
Enter

Hope this can be help you ..
forza la beneamata

[ 發表回應 ] ( 2預覽 )   |  常註連結  |   ( 3 / 242 )
MS Access: upsizing to SQL Server 2008 
Source : (Cypris).Cypris' lookout. http://blog.nkadesign.com/2009/ms-acces ... rver-2008/

I’m currently researching ways to move my main MS Access application from a simple local network client/backend setup to a global, multiple remote sites configuration using SQL Server.

One of the challenges is to upsize the current MS Access 2007 backend database to SQL Server 2008. If you try it from Access itself using the Upsizing Wizard, you may end up getting this error message:

The Upsizing Wizard only works with Microsoft SQL Server (Versions 6.50 SP5 or higher). Please log in to a SQL Server data source.



After spending some time fiddling around with SQL Server settings I couldn’t understand why I was still getting this error.
Turns out that the upsizing wizard is apparently sensitive to the version of SQL Server you’re using and it doesn’t consider SQL Server v10 (2008) as being later than v6.50…

This issue is in fact a blessing.
Microsoft provides a migration tool for upsizing MS Access database to SQL Server 2008 that’s orders of magnitude better than anything the basic wizard can do: the SQL Migration Assistant for Access, or SSMA.

SSMA lets you take a bunch of Access databases and move the tables and queries you choose to SQL Server, automatically linking them in your original database if you want.
It’s not just a one-off thing either: SSMA keeps track of the objects that where transferred and allows you to synchronise both schema and data as often as you need.

So here you are: do not use the basic MS Access Upsizing Wizard, download and use SSMA instead.

Strange COM Error
While SSMA works perfectly fine on my Windows 2008 x64 laptop, on my main Windows XP desktop it throws an exception when trying to load an Access database:

Unable to cast COM object of type ‘Microsoft.Office.Interop.Access.Dao.DBEngineClass’ to interface type ‘Microsoft.Office.Interop.Access.Dao._DBEngine’
… {00000021-0000-0010-8000-00AA006D2EA4}…

It was a COM error saying that the library for DAO couldn’t be loaded.
I couldn’t find any relevant information on the web.
After a while, I had a look at the DAO driver in
C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll
and I noticed that the filename was in blue: that reminded me that I had set compression on the filesystem.

I disabled compression for the file and, magically, SSMA worked again…




Moral of the story: be careful about compressing your filesystem, some registered libraries and system files may work in unpredictable ways…



[ 發表回應 ] ( 69預覽 )   |  常註連結  |   ( 3 / 693 )
MySQL IP Sorting Command 
mysql> SELECT INET_ATON('209.207.224.40');
-> 3520061480

mysql> SELECT INET_NTOA(3520061480);
-> '209.207.224.40'

e.g.
SELECT `ipaddress` FROM `blockip` ORDERBY INET_ATON(`ipaddress`)


[ 發表回應 ] ( 23預覽 )   |  常註連結  |   ( 3 / 794 )
MailScanner Auto Block and Release IP 
crontab -e
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/php /opt/mailscanner_sql_blockip.php

#!/usr/local/bin/php
<?php
$linkptr = mysql_pconnect ("192.168.50.172","mailwatch","A47kacn3");
mysql_select_db("mailscanner",$linkptr);

$accessfile = "/etc/mail/access";

$sql = "SELECT clientip FROM `maillog` WHERE `sascore` >=10 and `timestamp` > DATE_ADD(now() ,INTERVAL -5 MINUTE) group by clientip ORDER BY INET_ATON(clientip)";
$result = mysql_query($sql);

while ($row = mysql_fetch_assoc($result)) {
$sql = "SELECT `ipaddress` FROM`ac_blockip` WHERE `ipaddress`= '".$row['clientip']."'";
$resulttemp = mysql_query($sql);
list($r_ipaddress) = mysql_fetch_row($resulttemp);
mysql_free_result($resulttemp);
if ($r_ipaddress == $row['clientip']) {
$sql = "UPDATE ac_blockip SET score=(score + 1),`timeout`=DATE_ADD( now() ,INTERVAL (score*24) HOUR),`status`='B' where ipaddress='".$row['clientip']."'";
mysql_query($sql,$linkptr);
} else {
$sql = "INSERT INTO `ac_blockip`(`ipaddress`, `score`, `timeout`, `status`) VALUES ('".$row['clientip']."',1,DATE_ADD( now() ,INTERVAL 24 HOUR),'B')";
mysql_query($sql,$linkptr);
}
}
mysql_free_result($result);

$sql = "UPDATE `ac_blockip` SET `timeout`=0,`status`='R' where `status` = 'B' and `timeout` < now()";
mysql_query($sql,$linkptr);

$sql = "SELECT `ipaddress` FROM `ac_blockip` where status = 'B'";
$result = mysql_query($sql);

$temp = "";
$fh = fopen($accessfile, 'w') or die("can't open file");
while ($row = mysql_fetch_assoc($result)) {
$temp1 = $row['ipaddress']."\t550 Address invalid\n";
fwrite($fh, $temp1);
}
fclose($fh);
mysql_free_result($result);

system('/usr/sbin/makemap dbm /etc/mail/access < /etc/mail/access');

?>


[ 發表回應 ] ( 45預覽 )   |  常註連結  |   ( 3 / 881 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 下一頁> >>