■CALENDAR■
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30   
<<前月 2010年09月 次月>>
■LOGIN■
現在のモード: ゲストモード
USER ID:
PASSWORD:
■NEW ENTRIES■
■RECENT COMMENTS■
■RECENT TRACKBACK■
■CATEGORIES■
■ARCHIVES■
■LINK■
■PROFILE■
■POWERED BY■
BLOGN(ぶろぐん)
BLOGNPLUS(ぶろぐん+)
■OTHER■

Squidで許可サイトのみ接続
squidで社内PCを業務に関係あるサイトのみ接続できるようにしました。

vi /etc/squid/squid.conf

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl localnet src 192.168.1.0/255.255.255.0
acl localnet src 192.168.10.0/255.255.255.0
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

acl allowlist url_regex "/etc/squid/list.txt"

/etc/squid/list.txt に許可サイトを正規表現で記述。

vi /etc/squid/list.txt
^http://maps.google.co.jp/
^http://www.google.com/

あとはクライアントPC(Windows)のレジストリを編集して、proxyを外せないようにし、念のため接続タブも消しておきました。

HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel\Proxy
1:プロキシ設定変更不可         0:可

HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel\ConnectionsTab
1:接続タブ無効化            0:有効化




| Linux::Linux | 09:23 AM | comments (17) | trackback (0) |
IP Adress変更
久々にIPを変更したら、resolv.confの編集を忘れてしまってメールが送れなくさせてしまいました汗
まぁ冷静に考えて、digコマンド引いた時点でスグわかりましたが、自己メモがてら。

IP addressを変更する際、以下のファイルを編集すること。

/etc/sysconfig/network-scripts/ifcfg-eth0
/var/named/chroot/etc/named.conf
/var/named/chroot/etc/named.conf で指定したファイル
/etc/resolv.conf

あとは稼働しているserverによって/etc/postfix/main.cf や/etc/httpd/conf/httpd.conf などを編集!

| Linux::Linux | 03:19 PM | comments (0) | trackback (0) |
HDD廃棄(データ完全消去)
ファイル置き場にしていたハードディスクから異音がしだしたことと、11GBっていう古さもあったので廃棄することにしました。

基幹業務のファイルのバックアップファイル置き場に使っていたディスクなんで万が一のデータ流出が怖いので、完全に消去しようと思います。

よく還元消去などと書かれたシェアソフトを目にしますが、Linuxならddコマンドが使えるのでランダムデータを2回書き込んだ後に、0で埋めれば問題ないでしょう。



# dd if=/dev/urandom of=/dev/hdb
# dd if=/dev/urandom of=/dev/hdb
# dd if=/dev/zero of=/dev/hdb


これでOKですが、心配性なので物理的破壊も加えました(^^;;

消去の意味なくなりました(笑)

| Linux::Linux | 07:16 PM | comments (0) | trackback (0) |
USEN Gyao マンションLANタイプ開通
先ほどGyaoが開通しましたにこっ

固定のIPもらえるってのが最大の魅力と、Bフレッツは導入準備中ってことだったんで開通までの時間の短いUSEN(Gyao)にしました。
マンションまでファイバー引き込み済ってことだったので申込みから10日で開通となりADSL並みの期間で開通しました。

LANタイプってことでどんな感じなんだろうって思ってたら、LANのモジュラージャックが1つ設置されただけ…
で、直接ストレートケーブル指せば、DHCPからアドレスが割り振られてきて接続可能jな状態になります。

しかも説明を受けると固定IPが5つもついてました太陽
ハードディスクレコーダーや、カメラ、DNSやMTAもIP分けることが可能です♪
これはかなりお得ですにこっ

どのIPをどのサーバーや機器に割り振るかとかは後からゆっくり考えるとして、早速スピードテスト。

マックで計測したのと同じCrusoeで計測。

下り 9.957Mbps
上り 4.74Mbps

下りは倍くらい出ていてほしいなぁって思いながらも、上りは十分な速度だと思います。
従来までの7倍強の速度ですので、このサイトの表示時間も短くなるし、VPNで家庭内LANに入った時も軽くなるし…

また、環境を整備してレポートしたいと思います。



| Linux::Linux | 08:51 PM | comments (0) | trackback (0) |
Apache SSL 鍵の更新
鍵の作成時有効期限365日のオプションを入れておいたので、31日前から以下のようなメールが届き始めました。

Return-Path: <root@fedoracore4.com>
X-Original-To: root
Delivered-To: yuichi@fedoracore4.com
Received: by fedoracore4.com (Postfix, from userid 0)
id B1D086F8889; Wed, 14 Jun 2006 04:02:08 +0900 (JST)
To: root@fedoracore4.com
Subject: The certificate for fedoracore4.com will expire in 9 days
Message-Id: <20060613190208.B1D086F8889@fedoracore4.com>
Date: Wed, 14 Jun 2006 04:02:08 +0900 (JST)
From: root@fedoracore4.com (root)



################# SSL Certificate Warning ################

Certificate for fedoracore4.com, in file:
/etc/httpd/conf/server.pem

The certificate needs to be renewed; this can be done
using the 'genkey' program.

Browsers will not be able to correctly connect to this
web site using SSL until the certificate is renewed.

##########################################################
Generated by certwatch(1)




そこで、鍵の更新を行うことにしました。


[root@fedoracore4 ~]# cd /etc/pki/tls/certs
[root@fedoracore4 certs]# rm -rf server.key 既存の秘密鍵の削除
[root@fedoracore4 certs]# make server.key 新しい秘密鍵の作成
umask 77 ;
/usr/bin/openssl genrsa -des3 1024 > server.key
Generating RSA private key, 1024 bit long modulus
..............................................++++++
................++++++
e is 65537 (0x10001)
Enter pass phrase: パスワード入力
Verifying - Enter pass phrase: パスワード再入力
[root@fedoracore4 certs]# openssl rsa -in server.key -out server.key パスワード削除
Enter pass phrase for server.key: パスワード入力
writing RSA key
[root@fedoracore4 certs]# make server.csr 公開鍵の作成
umask 77 ;
/usr/bin/openssl req -utf8 -new -key server.key -out server.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:JP 国名
State or Province Name (full name) [Berkshire]:Osaka 都道府県名
Locality Name (eg, city) [Newbury]:Tyuou-ku 市区町村
Organization Name (eg, company) [My Company Ltd]:fedoracore4.com 組織名
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:fedoracore4.com サーバー名
Email Address []:webmaster@fedoracore4.com メールアドレス

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: ENTER
An optional company name []: ENTER
[root@fedoracore4 certs]# openssl x509 -in server.csr -out server.pem -req -signkey server.key -days 365 有効期限付サーバー証明書作成
Signature ok
subject=/C=JP/ST=Osaka/L=Tyuou-ku/O=fedoracore4.com/OU=fedoracore4.com/CN=fedoracore4.com/emailAddress=webmaster@fedoracore4.com
Getting Private key
[root@fedoracore4 certs]# chmod 400 server.* パーミッションの設定
[root@cc certs]# /etc/init.d/httpd reload
httpd を再読み込み中: [ OK ]
[root@cc certs]#

| Linux::Linux | 10:09 AM | comments (1) | trackback (0) |
PAGE TOP ↑