Ubutu에서 vsftp를 설치한 후 conf에서 몇 가지 수정을 하였다.
 sudo apt-get install vsftpd

그후 수정 내용
 sudo vi /etc/vsftpd.conf

anonymous_enable=NO

 sudo /etc/init.d/vsftpd restart

한 후에 editplus 로 접속하여 파일을 저장하는데, 계속 550 access is denied. 메시지가 계속 발생하였다.

인터넷을 검색한 결과
http://spectrum.egloos.com/5410943

이곳에서 알게 되었다.
 write_enable = YES
을 해줘야한다는것..

conf을 제대로 읽지 않아서 결과 이런 일이 발생하였다.

30분동안 이것 찾느라 정신없었다..ㅠㅠ


Posted by 노을지기
이전까진 itables 을 사용했었는데, 이것을 사용하니 너무 어려운 점이 있었다.
대신 자세히 방화벽을 걸 수 있으므로.. 장점이 있음.

ubuntu 검색 중 ufw 가 있어서 설정해보았다..^^

 sudo ufw enable

설정이 완료되었다.
그리고 지금까지 설치한 서비스에 대하여, 포트를 열어 줘야 한다.

80번, 21번, 22번, 3000번 등..
 sudo ufw allow 80
 sudo ufw allow 21
 sudo ufw allow 22
 sudo ufw allow 3000

간단한 것이 좋지만, 때론 허무한 느낌..
Posted by 노을지기
Netscreen에 cati을 사용하려고 보니, cisco 장비 template가 있는데, juniper용은 없었다.

그래서 google 에서 검색한 결과 template을 다운 받아서 설치해야한다.

http://docs.cacti.net/usertemplate:host:juniper:isg

Installation

  1. Unzip the download
  2. Via cacti web console, click on “Import Templates” and import the file “cacti_host_template_*.xml”
  3. Via scp or other tool, copy the files “resource/snmp_queries/*.xml” into directory ”<path_cacti>/resource/snmp_queries/”
  4. Create new device using the new imported host template
  5. Check new graphs


Screenshots

The following graph are global to all Juniper firewalls running ScreenOS:

The following graph is specific for Juniper ISG device using IP Pools:

The following graphs are specific to Juniper ISG device containing IDP card:

Posted by 노을지기
참고 자료: http://nokia.egloos.com/3265536

이분께서 잘 설명해주셔서 그냥 따라하기만해도 되었다..^^

Cacti 사이트 : http://www.cacti.net/index.php
항상하기 전에 반드시 사이트에서 확인하고 하는 것이 최고인듯..^^

cacti 설치하기.
cacit의 기본 설치 위치: /usr/share/cacti/site
 apt-get install cacti
그러면 알아서 설치한다.
그 중 물어보는 것..

libphp-adodb의 경로가 변경되는 것
/usr/share/adodb -> /usr/share/php/adodb

apache 서버를 어떤 것?
apache2 선택

dbconfig-common으로 설정 유무?
(자세한 파일은 /usr/share/doc/cacti)
확인 후에는 db의 관리자 패스워드 입력창.
이후 cacti에서 사용할 패스워드 입력.

그리고 완료.
그후에 http://localhost/cacti로 보기 위해서 링크 걸기.
 ln -s /usr/share/cacti/site cacti

이후 접속은 http;//localhost/cacti 로 접속한다.
그후 설정페이지...

Posted by 노을지기
인터넷을 검색한 결과 대부분 소스 컴파일 방식이라 자료 찾기가 어려웠다.
하지만 apt-get으로 설치해야 해서 여기 저기 찾아서 해보았다.

apt-get install mrtg rrdtool librrds-perl
하라고 되어있다.
이미 mrtg는 설치했으니, rrdtools과 librrds-perl을 설치한다.
apt-get install rrdtool librrds-perl

그리고 이미 snmp는 라우터의 것을 사용하니, 이것도 패스..
섶이 위치는 다음과 같다.
소스 컴파일시에서는 이런것을 설정해야하지만, apt을 이용하면 이런 귀찮음이 없어진다.
하지만 단점은 어디에 설치되었는지 찾기 어렵다는 것이다.
/usr/lib/perl
/usr/bin/rrdtool

mrtg.cfg 파일을 변경해야 한다.
 vi /etc/mrtg.cfg

### Global Defaults
Logformat: rrdtool
이것만 추가하면 된다.
소스 컴파일시에는 PathAdd, LibAdd를 추가해야하지만, apt-get으로 설치했을 경우는 상관없는듯하다.

html 위치는 /var/www/mrtg 로...

그후 MRTS을 다운 받아야 한다.
Logformat을 rrdtool로 변경하면 더이상 MRTG가 그래프를 그리지 못한다. 그래서 RRDTool을 이용해야 한다.
MRTS(MRTG RRDtool Total Statistics) : php 기반의 프로그램이다.
다운로드 사이트: http://download.tsdn.dk/software/mrts/
cd /var/www/mrtg
wget http://download.tsdn.dk/software/mrts/mrts-v0.1.1.php.gz
gunzip mrts-v0.1.1.php.gz
ln -s mrts-v0.1.1.php mrts.php

이후에 $dir 위치를 변경한다.
이곳은 MRTG+RRDTool 그래프가 그려질 디렉토리이다.
 vi /var/www/mrtg/mrts.php
 
/* The directory where the rrd files are located */
$dir = '/var/www/mrtg';
17번째 라인에서 mrtg 디렉토리로 변경한다.

참고로 26번째 라인에 RRDTool 바이너리 파일 지정이 있는데,
/* RRDtool path - where are the the executable located */
$rrdcommand = '/usr/bin/rrdtool';
이미 설정되어 있다.
소스 컴파일에서는 다 해줘야하지만, apt-get에서는 필요가 없다. 이것 좋은 점..

아파치를 재시작..
 /etc/init.d/apache2 restart

이제 웹페이지 확인하면 된다.
처음엔 타이틀만 보이지만 5분뒤에 모든 그래픽이 보인다.
http://localhost/mrtg/mrts.php

윈도우에서 하려고 하다가 못했는데,
리눅스에서 하니 기분은 좋다..^^


참고 자료:

Home of MRTS - MRTG RRDtool Total Statistics.

Download it or see what it does

How to use it

For a more complete installation guide see this tutorial by Bjoern Weiland

To use MRTS you need to install and set up MRTG and RRDtool.

If you are a Debian GNU/Linux user just do a
apt-get install mrtg rrdtool librrds-perl
if you use another OS, you can probably figure it out youself (or you could change to Debian).

It can also be a good idea to have some standard snmp tools installed (in Debian the package is "snmp"), and if you want to log network traffic on a machine, then install a snmp server (Debian: "snmpd").

Set up the snmp server to allow read access from the machine that is running MRTG (in our example the same machine that we are logging therefore we allow access to 127.0.0.1). If you are using Debian and have installed the snmpd package, you should change a line or two in "/etc/snmp/snmpd.conf". From:

com2sec paranoid   default         public
#com2sec readonly default public
#com2sec readwrite default private to:
#com2sec paranoid default public
com2sec readonly 127.0.0.1 public
#com2sec readwrite default private \and then restart the snmp server: /etc/init.d/snmpd restart

Now you have to find out what device you want to log. You can find this out with this command:

$ snmpwalk 127.0.0.1 public interfaces.ifTable.ifEntry.ifDescr
interfaces.ifTable.ifEntry.ifDescr.1 = lo
interfaces.ifTable.ifEntry.ifDescr.2 = eth0

in this example, we want to log traffic on the eth0, so the number we must use is 2.
Set up the mrtg config file (Debian: "/etc/mrtg.cfg") with something like this:
# Global configuration
WorkDir: /var/log/mrtg
WriteExpires: Yes
Logformat: rrdtool

#For every machine
Target[name-of-machine]: 2:public@127.0.0.1
MaxBytes[name-of-machine]: 12500000
Title[name-of-machine]:
PageTop[name-of-machine]:

In the "Target" line you see the number 2 we found before, and in "MaxBytes" we have set how many bytes the device maximum can transfer (100Mbit * 1000000bit/Mbit / 8byte/bit = 12500000byte).

Now all you have to do is put mrts.php in the web scope and browse into it. (maybe you have to change something in the top of mrts.php)

You can't run the script in "safe mode php", if you server does this as standard, you have to put something like this in your httpd.conf:

<Directory "/path/to/mrts">
php_admin_value safe_mode 0
</Directory>
Posted by 노을지기