h3c.png

问题:

tracert 或 traceroute 命令,通过 H3C 交换机时,提示 timeout,无响应。

解决:

启用ICMP超时报文转发功能,启用ICMP目的不可达报文转发功能。

ip ttl-expires enable
ip unreachables enable

问题:

Windows 通过中国联通 WCDMA 3G 拨号上网,PPP 拨号成功:正在网络上注册您的计算机,然后出现 734 错误。

分析:

中国大陆部分省,地区,需要指定 APN 为:3gnet,否则会在验证用户名密码完成后,出现 734 错误。

解决:

配置调制解调器设备(比如:蓝牙设备),增加 APN 参数:设备管理器 -> 调制解调器 -> Bluetooth DUN Modem -> 高级 -> 额外设置

AT+CGDCONT=1,"IP","3gnet"

3gnet.gif

作者: reistlin
来源: http://www.reistlin.com/blog/35
更新时间: 2009.06
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

pfsense.png

本文是根据 [pfSense] 的官方文档 Hardware Sizing Guidance 翻译的.水平有限.只翻译了重要的部分.很多补充是根据自己5年的安全从业经验整理的.个人认为.所有基于x86架构防火墙都可以参考本文进行硬件性能评估.pfSense(FreeBSD)的文档非常客观严谨.想深入了解防火墙性能的朋友请不要错过.

- 阅读剩余部分 -

作者: reistlin
来源: http://www.reistlin.com/blog/34
更新时间: 2008.09
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

checkpoint.png

1. SmartCenter 备份导出:

$FWDIR/bin/upgrade_tools/upgrade_export

IPSO 与 Windows 平台的 SmartCenter 服务器.均可以使用 upgrade_export 命令将服务器的所有配置与安全策略导出为 .tgz 文件.

$FWDIR/bin/upgrade_tools/upgrade_export smc_backup.tgz

2. SmartCenter 恢复导入:

$FWDIR/bin/upgrade_tools/upgrade_import

请注意.导入备份的 .tgz 文件会覆盖和更新 (Upgrade) SmartCenter 的配置.包括 License 文件.需慎重.

$FWDIR/bin/upgrade_tools/upgrade_import smc_backup.tgz

3. SmartCenter 重新启动:

cp restart

作者: reistlin
来源: http://www.reistlin.com/blog/33
更新时间: 2010.08
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

linux.pngcode.png

#!/usr/bin/perl -w 

# Name: create md5 v1.0
# Author: reistlin
# Website: www.reistlin.com
# Hotfix: bigyong
# Website: www.bigyong.com
# Date: 2010.08.02

use strict;
use Data::Dumper;
use Digest::MD5 qw(md5 md5_hex md5_base64);


# Debug Switch
my $debug = 0;

# Start Time
my $time_1 = time();
# Clear
system "clear";


# Defined Original Hash File
my $original_file = "check_md5.log";
my %original_hash;

# Defined CheckList Directory
my $checklist_dir = "/home/reistlin";

# Defined Exclude Directory
my $exclude_tag = 0;
my @exclude_dir = ("/home/reistlin/exclude1", "/home/reistlin/exclude2");
my $exclude_key = join("|", @exclude_dir);


# Create MD5 Mode
sub createmd5 {
        my $path = shift;
        # clean path end "/"
        $path =~ s/\/+$//;

        opendir(DIR, $path) or die "[Error] Can not check directory [$path] \n";
        my @list = readdir(DIR);
        closedir(DIR);

        foreach my $tmp (@list) {
                # exclude "." or ".."
                next if ( $tmp =~ m/^\.+$/ );
                # full path
                my $path_sub = $path . "/" . $tmp;
                # exclude directory
		next if ( ( $path_sub =~ /$exclude_key/ ) && ( $exclude_tag == 1 ) );
                # subdirectory recursive
                if ( -d $path_sub ) {
                        &createmd5($path_sub);
                } else {
			$original_hash{$path_sub} = &md5sum($path_sub);
                }
        }
}


# MD5 Check Mode
sub md5sum {
        my $file = shift;
        open(FILE, $file) or die "[Error] Can not check file [$file] \n";
        binmode(FILE);

        my $md5 = Digest::MD5->new();
        $md5->addfile(*FILE);

        close(FILE);

        $md5->hexdigest;
}


# File Stat Mode
sub filestat {
        my $file = shift;
        my @file_stat = stat($file);
        my $mtime = localtime $file_stat[9];
        my $ctime = localtime $file_stat[10];

        print "\n";
        print "[$file] Modify: $mtime \n";
        print "[$file] Change: $ctime \n";
        print "[$file] UID: $file_stat[4] \n";
        print "[$file] GID: $file_stat[5] \n";
        print "[$file] Size: $file_stat[7] bytes \n";
        print "\n";
}


# Main Program
&createmd5($checklist_dir);


# Create MD5 logfile
open(LINE, "+>" . $original_file) or die "[Error] Can not create MD5 logfile [$original_file] \n";

while ( my ($file, $md5) = each %original_hash ) {
	print LINE "$md5 $file\n";
}

close(LINE);


# Print Result
if ( -e $original_file ) {
	print "Congratulations! MD5 logfile Create Succeed! \n";
	&filestat($original_file);
}


# End Time
my $time_2 = time();
my $time = $time_2 - $time_1;


# Script Runtime
print "Runtime \[$time\] Seconds ... \n";
print "End! Good Luck! :-) \n";
print "\n";

作者: reistlin
来源: http://www.reistlin.com/blog/32
更新时间: 2010.08
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

linux.pngcode.png

#!/usr/bin/perl -w 

# Name: check md5 v1.0
# Author: reistlin
# Website: www.reistlin.com
# Hotfix: bigyong
# Website: www.bigyong.com
# Date: 2010.08.02

use strict;
use Data::Dumper;
use Digest::MD5 qw(md5 md5_hex md5_base64);


# Debug Switch
my $debug = 0;

# Start Time
my $time_1 = time();
# Clear
system "clear";


# Defined Original Hash File
my $original_file = "./check_md5.log";
my %original_hash;

# Defined CheckList Directory
my $checklist_dir = "/home/reistlin";

# Defined Exclude Directory
my $exclude_tag = 0;
my @exclude_dir = ("/home/reistlin/exclude1", "/home/reistlin/exclude2");
my $exclude_key = join("|", @exclude_dir);

# Defined Result
my @md5_ok;
my @md5_no;
my @md5_bad;


# Check Hash File
if ( ! -e $original_file ) { 
	print "[Error] Can not open MD5 logfile [$original_file] \n"; 
	print "[Error] Please run the \[create_md5.pl\] to create original MD5 logfile \n"; 
	exit;
} else {
	# check file stat
	&filestat($original_file);

	# load hash file
	open(FILE, $original_file);

	while (<FILE>) {
		my $line = $_;
		if ( $line =~ m/(.+)\s+(.+?)\s*$/ ) {
			$original_hash{$2} = $1;
		}
	}
	close(FILE);
}


# List file Check MD5
sub checkmd5 {
	my $path = shift;
	# clean path end "/"
	$path =~ s/\/+$//;

	opendir(DIR, $path) or die "[Error] Can not check directory [$path] \n";
	my @list = readdir(DIR);
	closedir(DIR);

	foreach my $tmp (@list) {
		# exclude "." or ".."
		next if ( $tmp =~ m/^\.+$/ );
		# full path
		my $path_sub = $path . "/" . $tmp;
		# exclude directory
		next if ( ( $path_sub =~ /$exclude_key/ ) && ( $exclude_tag == 1 ) );
		# subdirectory recursive
		if ( -d $path_sub ) {
			&checkmd5($path_sub);
		} else {
			# check key
			if ( exists $original_hash{$path_sub} ) {
				# check md5 
				if ( $original_hash{$path_sub} eq &md5sum($path_sub) ) {
					push @md5_ok, $path_sub;
				} else {
					push @md5_bad, $path_sub;
				}
			} else {
				push @md5_no, $path_sub;
			}
		}
	}
}


# MD5 Check Mode
sub md5sum {
	my $file = shift;
	open(FILE, $file) or die "[Error] Can not check file [$file] \n";
	binmode(FILE);
	
	my $md5 = Digest::MD5->new();
	$md5->addfile(*FILE);
	
	close(FILE);
	
	$md5->hexdigest;
}


# File Stat Mode
sub filestat {
	my $file = shift;
	my @file_stat = stat($file);
	my $mtime = localtime $file_stat[9];
	my $ctime = localtime $file_stat[10];
	
	print "\n";
	print "[$file] Modify: $mtime \n"; 
	print "[$file] Change: $ctime \n";
	print "[$file] UID: $file_stat[4] \n";
	print "[$file] GID: $file_stat[5] \n";
	print "[$file] Size: $file_stat[7] bytes \n";
	print "\n";
}


# Print Array Mode
sub print_array {
	my @array = @_;
	foreach my $tmp (@array) {
		print "$tmp \n";
	}
}


# Main Program
&checkmd5($checklist_dir);


# Print Result Mode
my $scalar_ok = scalar(@md5_ok);
my $scalar_no = scalar(@md5_no);
my $scalar_bad = scalar(@md5_bad);

print "[OK MD5] $scalar_ok Files:\n";
&print_array(@md5_ok);
print "\n";

print "[NO MD5] $scalar_no Files:\n";
&print_array(@md5_no);
print "\n";

print "[BAD MD5] $scalar_bad Files:\n";
&print_array(@md5_bad);
print "\n";


# End Time
my $time_2 = time();
my $time = $time_2 - $time_1;

# Script Runtime
print "Runtime \[$time\] Seconds ... \n";
print "End! Good Luck! :-) \n";
print "\n";

linux.png

[root@secure ~]# echo "reistlin.com" | passwd --stdin root
Changing password for user root.
passwd: all authentication tokens updated successfully.

vmware.png

1. 登录系统本地 Console 控制台. 按 "Alt+F1"

2. 输入命令(屏幕无显示): unsupported

3. 进入 Tech Support Mode 模式, 输入 Root 密码

4. 编辑 /etc/inetd.conf 文件, 取消 #SSH 注释:

vi /etc/inetd.conf

5. 重启 inetd 服务:

kill -HUP `ps | grep inetd`