리눅스 “umount : device is busy” 발생시 강제 umount 방법

페도라든 우분트든,.. 내가 사용하고 있는 리눅스 시스템에서, 분명히 사용중이 아닌 경우에도 
mount된 디렉토리를 umount 하고자 할 때,
특정 사용자 & 프로세스가 해당 디렉토리를 사용하고 있다며 

[root@linux ~]# umount /backup
umount: /backup: device is busy.        
(In some cases useful info about processes that use the device is found by lsof(8) or fuser(1))


라고 
“device is busy” 메세지가 발생하며 umount 가 되지 않을 때가 있다. 

누가? 또는 어떤 프로세스가 해당 mount 영역을 사용하고 있는지 확인 하고 싶을때는

# fuser -cu /backup

이 경우 umount를 위해 해당 프로세스를 강제로 kill 하는 방법은 아래와 같다.

# fuser -ck 마운트디렉토리

ex) fuser -ck /backup

위 명령으로 프로세스를 kill 하고 umount를 재시도하면 정상적으로 mount가 해제 된다.

Ubuntu 14.04 + sendmail 설치

** sendmail 설치 및 설정

 

> 설치 

# apt-get install sendmail
# apt-get install sendmail-cf    ;; sendmail 설정

> 제대로 설치되었나 확인

# cd /etc/mail

 

> 내부에서만 메일을 주고 받을수 있게 설정해보자

# vi /etc/mail/sendmail.mc

Line 56 아래와 같이 수정
DAMON_OPTIONS('Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl

Line 59 아래와 같이 수정
DAMON_OPTIONS('Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl

# m4 sendmail.mc   ;; 변경된 값 적용

 

> 접근할 수 있는 IP 대역 설정 추가

 

# vi /etc/mail/access

아래 부분 추가

127.0.0.1 RELAY
192.168.0 RELAY ;; 내부 아이피에서는 허용
;; 공인 아이피가 있다면 같이 추가해줌

# makemap hash access < access ;; 적용

> sendmail 재시작

 

# service sendmail restart

 

  

** sendmail이 가긴 가는데 너무 느리게 갈 때

 

> sendmail error log 확인

 

# vi /var/log/mail.err

아래 내용이 있는지 확인
My unqualified host name (localhost) unknown;; sleeping for retry

 

host name을 못 찾겠다 하지만 메일은 보내주겠다는 내용인 것 같음.

 

> host name 추가

# vi /etc/hots

127.0.0.1    localhost.localdomain localhost (yourhostname)

 

 

 

Asterisk – 해킹 시도 Fail2Ban 으로 차단하기

Fail2Ban (with iptables) And Asterisk

Fail2Ban


Fail2Ban is a limited intrusion detection/prevention system. It works by scanning log files and then banning IPs based on the entries in those logs. Note that Digium is moving away from writing security information to log files, and is now using AMI events. Consider fail2ban a short-term solution only.

You can get Fail2Ban, as well as more documentation, at www.fail2ban.org. At the time this is being written, the current release is 0.8.4.

Fail2Ban With Asterisk


The following describes how to setup Fail2Ban to protect an Asterisk PBX from SIP brute force attempts and scans utilizing the iptables firewall.

SECURITY NOTE: fail2ban is rather limited in its ability to detect attacks against asterisk. 
More info http://forums.asterisk.org/viewtopic.php?p=159984
Consider a more comprehensive product like the free edition of SecAst www.generationd.com

Easy Install Script for Fail2ban version 0.8.4 / Red Hat


This script was written by Cédric Brohée in order to simplify and accelerate the integration of the solution in a basic Asterisk configuration on Red Hat.
Do not hesitate to read the bash script and make changes to match your own configuration.

Before running it, you will have to do chmod 755.

Download script with new dedicated sources :

Fail2ban.sh_030512.txt




Installing


Log into the system and su – root, or sudo -i to get a root shell on Ubuntu.

CentOS/Red Hat (this method may install an older version of fail2ban):

Install rpmforge or optionally fetch the fail2ban rpm directly from rpmforge.
Install fail2ban using yum:

yum install fail2ban

Debian/Ubuntu:

apt-get install fail2ban

Source installation:
Change directories to /usr/src:

cd /usr/src

Download and extract Fail2Ban (check for newer releases):

wget http://sourceforge.net/projects/fail2ban/files/fail2ban-stable/fail2ban-0.8.4/fail2ban-0.8.4.tar.bz2/download
tar jxf fail2ban-0.8.4.tar.bz2

Enter the Fail2Ban directory you just extracted:

cd fail2ban-0.8.4

Make sure python and iptables are installed:

CentOS/Red Hat:

yum install python iptables

Debian/Ubuntu:

apt-get install python iptables

Install Fail2Ban:

python setup.py install

Install the Fail2Ban init script (for source installations):

Centos/Red Hat (if you installed via yum/rpm, the init script has already been installed):

cp /usr/src/fail2ban-0.8.4/files/redhat-initd /etc/init.d/fail2ban
chmod 755 /etc/init.d/fail2ban

For other distributions’ init scripts, please refer to documentation specific to them.



Configure Fail2Ban


We need to create a configuration for Fail2Ban so that it can understand attacks against Asterisk.

Create a new filter configuration for Asterisk:

touch /etc/fail2ban/filter.d/asterisk.conf

The contents of /etc/fail2ban/filter.d/asterisk.conf should be the following:

Generic (without using /var/log/asterisk/security)


# Fail2Ban configuration file
#
#
# $Revision: 250 $
#

[INCLUDES]

# Read common prefixes. If any customizations available -- read them from
# common.local
#before = common.conf


[Definition]

#_daemon = asterisk

# Option:  failregex
# Notes.:  regex to match the password failures messages in the logfile. The
#          host must be matched by a group named "host". The tag "<HOST>" can
#          be used for standard IP/hostname matching and is only an alias for
#          (?:::f{4,6}:)?(?P<host>\S+)
# Values:  TEXT
#

# Asterisk 1.4 use the following failregex

failregex = NOTICE.* .*: Registration from '.*' failed for '<HOST>' - Wrong password
            NOTICE.* .*: Registration from '.*' failed for '<HOST>:.*' - No matching peer found
            NOTICE.* .*: Registration from '.*' failed for '<HOST>' - No matching peer found
            NOTICE.* .*: Registration from '.*' failed for '<HOST>' - Username/auth name mismatch
            NOTICE.* .*: Registration from '.*' failed for '<HOST>' - Device does not match ACL
            NOTICE.* .*: Registration from '.*' failed for '<HOST>' - Peer is not supposed to register
            NOTICE.* .*: Registration from '.*' failed for '<HOST>' - ACL error (permit/deny)
            NOTICE.* .*: Registration from '.*' failed for '<HOST>' - Device does not match ACL
            NOTICE.* <HOST> failed to authenticate as '.*'$
            NOTICE.* .*: No registration for peer '.*' \(from <HOST>\)
            NOTICE.* .*: Host <HOST> failed MD5 authentication for '.*' (.*)
            NOTICE.* .*: Failed to authenticate user .*@<HOST>.*
            NOTICE.* .*: Sending fake auth rejection for device .*\<sip:.*\@<HOST>\>;tag=.*

# In Asterisk 1.8 use the same as above, but after <HOST> add :.* before the single quote. This is because in Asterisk 1.8, the log file includes a port number which 1.4 did not.

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =



If you’re having issues with your system not banning properly when the “Registration from” section in your log file contains a quotation mark (“) as in this example:


[2011-04-07 17:53:11] NOTICE[7557] chan_sip.c: Registration from '"69106698"<sip:69106698@123.123.123.123>' failed for '123.123.123.123' - No matching peer found



Add the following line, with the others above, in asterisk.conf:

NOTICE.* .*: Registration from ‘\”.*\”.*’ failed for ‘<HOST>’ – No matching peer found

Recently noticed attacks:


[2011-06-21 17:53:11] NOTICE[7557] chan_sip.c: Registration from '"XXXXXXXXXX"<sip:XXXXXXXXXX@123.123.123.123>' failed for '123.123.123.123' - Wrong Password


Adding the following line will block these attempts:

NOTICE.* .*: Registration from ‘\”.*\”.*’ failed for ‘<HOST>’ – Wrong password

Using new /var/log/asterisk/security

For this you will need an Asterisk that comes with the new Asterisk Security Framework (Asterisk 10+). You will also need to enable the log output in logger.conf by adding or uncommenting the line “security => security”. Likewise, you willl also need to ensure the date format has been changed in logger.conf to “dateformat=%F %T”.


# Fail2Ban configuration file
#
#
# $Revision: 250 $
#

[INCLUDES]

# Read common prefixes. If any customizations available -- read them from
# common.local
#before = common.conf


[Definition]

#_daemon = asterisk

# Option:  failregex
# Notes.:  regex to match the password failures messages in the logfile. The
#          host must be matched by a group named "host". The tag "<HOST>" can
#          be used for standard IP/hostname matching and is only an alias for
#          (?:::f{4,6}:)?(?P<host>\S+)
# Values:  TEXT
#

failregex = SECURITY.* SecurityEvent="FailedACL".*RemoteAddress=".+?/.+?/<HOST>/.+?".*
            SECURITY.* SecurityEvent="InvalidAccountID".*RemoteAddress=".+?/.+?/<HOST>/.+?".*
            SECURITY.* SecurityEvent="ChallengeResponseFailed".*RemoteAddress=".+?/.+?/<HOST>/.+?".*
            SECURITY.* SecurityEvent="InvalidPassword".*RemoteAddress=".+?/.+?/<HOST>/.+?".*

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =




Next edit /etc/fail2ban/jail.conf to include the following section so that it uses the new filter. This does a 3-day ban on the IP that performed the attack. It is recommend to set the bantime in the [DEFAULT] section so if affects all attacks. It is also recommend to turn on an iptables ban for ssh, httpd/apache, and ftp if they are running on the system. Be sure to edit the sendmail-whois action to send notifications to an appropriate address:


Generic (without using /var/log/asterisk/security)


[asterisk-iptables]

enabled  = true
filter   = asterisk
action   = iptables-allports[name=ASTERISK, protocol=all]
           sendmail-whois[name=ASTERISK, dest=root, sender=fail2ban@example.org]
logpath  = /var/log/asterisk/messages
maxretry = 5
bantime = 259200



note: logpath = /var/log/asterisk/messages is for vanilla asterisk, use logpath = /var/log/asterisk/full for freepbx. You can check the name of the log file in logger.conf.

note: if fail2ban still failed to identify login attempts, try the syslog logging way.

Using new /var/log/asterisk/security


[asterisk-iptables]
enabled  = true
filter   = asterisk
action   = iptables-allports[name=ASTERISK, protocol=all]
           sendmail-whois[name=ASTERISK, dest=root, sender=fail2ban@example.org]
logpath  = /var/log/asterisk/security
maxretry = 5
bantime = 259200



Don’t Ban Yourself


We don’t want to ban ourselves by accident. Edit /etc/fail2ban/jail.conf and edit the ignoreip option under the [DEFAULT] section to include your IP addresses or network, as well as any other hosts or networks you do not wish to ban. Note that the addresses must be separated by a SPACE character!

Asterisk Logging


We must change how Asterisk does its time stamp for logging. The default format does not work with Fail2Ban because the pattern Fail2Ban uses that would match this format has a beginning of line character (^), and Asterisk puts its date/time inside of []. The other formats that Fail2Ban supports, however, do not have this character and can be used with Asterisk.

To change this format, open /etc/asterisk/logger.conf and add the following line under [general] section (You may have to create this before the [logfiles] section). This causes the date and time to be formatted as Year-Month-Day Hour:Minute:Second, [2008-10-01 13:40:04] is an example.


 [general]
 dateformat=%F %T



Then reload the logger module for Asterisk. At the command line, run the following command:

asterisk -rx “logger reload”

If for some reason you do not want to change the date/time format for your normal asterisk logs (maybe you already have scripts that use it or something and do not want to edit them), you can do the following instead:

In /etc/asterisk/logger.conf, add the following line under the [logfiles] section for Asterisk to log NOTICE level events to the syslog (/var/log/messages) as well as its normal log file. These entries in syslog will have a Date/Time stamp that is usable by Fail2Ban.

syslog.local0 => notice

Be sure to reload the logger module for Asterisk — check above for the command to do so. If you chose this option, you will also have to change the/etc/fail2ban/jail.conf setting under the [asterisk-iptables] section for the logpath option to the following:

logpath = /var/log/messages

Turning it On


Now it is time to put fail2ban to work. There are a couple steps we need to do first.

Turn IPTABLES on


By default, iptables allows all traffic. So if we turn it on, it will not block any traffic until Fail2Ban creates deny rules for attackers. You should create your own firewall rules and setup for iptables, but that is beyond the scope of this guide. Just know that Fail2Ban, by default, inserts rules at the top of the chain, so they will override any rules you have configured in iptables. This is good because you may allow all sip traffic in and then the Fail2Ban will block individual hosts, after they have done an attack, before they are allowed by this rule again.

To start iptables, run the following as root:

/etc/init.d/iptables start

Depending on your install, you may or may not have the iptables init script installed. Please refer to an iptables install/setup guide for your distribution for more information.

Turn on Fail2Ban


To start Fail2Ban, run the following as root:

/etc/init.d/fail2ban start

Check It


If both started properly, issue the following command to view your iptables rules:

iptables -L -v

You should see something like the following for the INPUT chain (you will see more if you have other Fail2Ban filters enabled):

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
2104K 414M fail2ban-ASTERISK all — any any anywhere anywhere

If you do not see something similar to that, then you have some troubleshooting to do; check out /var/log/fail2ban.log.

If you do not see all your rules, or if you see a different subset of rules after stopping and restarting fail2ban, you may be experiencing the issue described on this page on the Fail2ban talk:Community Portal and may wish to use the suggested fix:

fail2ban.action.action ERROR on startup/restart

I had multiple fail2ban.action.action ERROR on startup/restart. It seems there was a “race” condition with iptables. I solved the problem completely on my system by editing /usr/bin/fail2ban-client and adding a time.sleep(0.1)


def __processCmd(self, cmd, showRet = True):
	beautifier = Beautifier()
	for c in cmd:
		time.sleep(0.1)
		beautifier.setInputCmd(c)



Turn it on for good


If all is well up to this point, let’s make sure that fail2ban and iptables restart with the server by issuing the following commands.

Centos/Red Hat:

chkconfig iptables on
chkconfig fail2ban on

Debian/Ubuntu:

update-rc.d iptables defaults
update-rc.d fail2ban defaults

You should now be somewhat protected against SIP scans and brute force attacks!

Try a reboot


Once you have fail2ban working ok, make sure that it continues that way after rebooting the server. On some distributions (including Ubuntu daper) fail2ban won’t start after the system reboots because the /var/run/fail2ban directory gets deleted and needs to be re-created. This can be frustrating as there is also nothing that shows up in the logs to indicate what the problem is. If this happens, please see the link below for instructions on modifying the startup script so that it checks for and creates the /var/run/fail2ban directory if needed:

http://informationideas.com/news/2010/04/21/fail2ban-does-not-start-after-reboot/

Additional Information

VPWallet.. 정말 대한민국 결제시스템 수준이 이정도인가..

어제 모 대형 쇼핑몰에서 결제를 하다가 뭘 설치하길레
뭐지?
얼마전에 결제 했을때는 설치 하지 않았는데.. 또 뭘 설치하려고 하네..
에효…국내 대형 쇼핑몰들이 이렇지..
하고 별 생각 없이 설치하고 결제 했는데..

이상하게 오늘 컴퓨터가 버버버버버…벅..  
그래도 구입한지는 2-3년 넘었으나, i5 CPU에, SSD와 8G RAM을 갖춘 쓸만한 노트북인데.. 이상하게 버버버버버버…벅…

작업관리자를 보니.. CPU 점유율이 4개 코어 모두 거의 90~100%..
이거 뭐지? 바이러스 인가?

하고 봤던..

“VPWalletLauncherC.exe”
“VPWalletService.exe”

요 두 녀석이 미친듯.. CPU를 먹구 있었다..
처음에는 바이러스라고 생각하고, 삭제를 하려고 보았는데.. 이름중에. “Service”.. 그래서 혹시나 하고.. 서비스 항목을 확인했더니..

떡하니.. 서비스 항목에 등록이 되어 있넹?

그것도 이 서비스를 쇼핑몰 결제 할때도 아닌, 24시간 서비스를 돌리고 있다… 세상에….

사용자 삽입 이미지
나 원참… 기가막혀서 말도 안나온다..

“This service is developed to use ISP in Non-ActiveX environment.”

자랑스럽게.. ActiveX 안쓴다고.. 적어 뒀다..
대통령께서 직접 나서서 ActiveX를 없애고, 쉽게 결제 가능하도록 시스템을 개선하라고 누차 이야기 하니깐..

ActiveX를 없애고 우리는 EXE를 사용해~  라고. 자랑스럽게 이야기 한다…
EXE는 쓰지 말라고 안했으니, 사용자 PC에 깔아서 쓰자.. 
이런식으로 해결 하고 있다..

정말 뭐가 문제이고.. 왜 대통령까지 나서서 이런 이야기를 하는지 이해를 못하고 있는 ISP 업체들이 답답하다.

이러니 우리들이 한국 온라인 시장을 점점 멀리하고 해외 시장을 이용하려고 하지..

어서 PayPal 같은 해외 결제 시스템이 빨리 국내에 도입되어야 저런 찌질한 업체들이 사라질텐데..

해결 방법..

제어판 – 관리도구 – 서비스 – VPWallet 을 찾아 
사용 -> 중지 로 변경
자동 -> 수동 으로 변경.

마음같이서는 삭제 하고 싶었으나,.. 가끔 어쩔수 없이 이용하는 온라인 결제때문에.. 삭제는 못했다..

이런 나같은 호갱들 때문에 저런 찌질한 업체들이 먹구 사는 건가…

Ubuntu – /var/log/message 설치 방법

Ubuntu 12.04를 설치 후 로그를 확인하고자 /var/log/messages 파일을 찾아보니….. 
어라? 없넹……

인터넷을 뒤져보니…  기본적으로 message 설정이 되어 있지 않넹.!~

보통 rssyslogd 는 기본 설치가 되어 있으므로, rsyslogd를 이용하여 설치하자!

 

심각한 오류(Critical Error) 는 /var/log/syslog 파일에 남으나,

그 외, INFO, NOTICE 등의 퍼실러티 등은 기록되지 않고 없어진다.

 

이는 기본 rsyslogd 의 설정 때문이라 한다. (왜!!! 덩치를 가볍게 로그조차 허용안하는게냐!)

 

아래 파일을 root 권한으로 열람한다.

$ sudo vi /etc/rsyslog.d/50-default.conf

#*.=info;*.=notice;*.=warn;\

#   auth,authpriv.none;\

#   cron,daemon.none;\

#   mail,news.none      -/var/log/messages

 

본문 중에 상기 내용을 찾아 아래와 같이 ‘#’으로 주석처리 되어 있는 부분을 수정한다.

(기록을 원하지 않는 항목이 있다면 제외하면 되겠다)

*.=info;*.=notice;*.=warn;\

   auth,authpriv.none;\

   cron,daemon.none;\

   mail,news.none      -/var/log/messages

 

(옵션) 또한 마지막 부분의 아래 항목을 ‘#’으로 주석 처리하자.

(다량의 메시지를 화면에 출력하는 것을 막는다)

 

#daemon.*;mail.*;\

#   news.err;\

#   *.=debug;*.=info;\

#   *.=notice;*.=warn   |/dev/xconsole

 

이후 저장하고(:wq) 종료하면 된다. 

 

(참조)아래를 참조하여 얼마 주기로 로그 파일을 갱신할 지 확인이 가능하다.

$ sudo vi /etc/logrotate.d/rsyslog

/var/log/messages

{

    rotate 4

    weekly

    missingok

    notifempty

    compress

    delaycompress

    sharedscripts

    postrotate

        reload rsyslog >/dev/null 2>&1 || true

    endscript

}

 

rsyslogd 데몬 서비스를 재실행 한다.

 

$ sudo /etc/init.d/rsyslog restart

 

이 후 부터는 기존처럼 /var/log/messages 에 로그가 쌓이기 시작한다.

 

 

Linux Log files and usage

 

=> /var/log/messages : General log messages

=> /var/log/boot : System boot log

=> /var/log/debug : Debugging log messages

=> /var/log/auth.log : User login and authentication logs

=> /var/log/daemon.log : Running services such as squid, ntpd and others log message to this file

=> /var/log/dmesg : Linux kernel ring buffer log

=> /var/log/dpkg.log : All binary package log includes package installation and other information

=> /var/log/faillog : User failed login log file

=> /var/log/kern.log : Kernel log file

=> /var/log/lpr.log : Printer log file

=> /var/log/mail.* : All mail server message log files

=> /var/log/mysql.* : MySQL server log file

=> /var/log/user.log : All userlevel logs

=> /var/log/xorg.0.log : X.org log file

=> /var/log/apache2/* : Apache web server log files directory

=> /var/log/lighttpd/* : Lighttpd web server log files directory

=> /var/log/fsck/* : fsck command log

=> /var/log/apport.log : Application crash report / log file

 

출처

http://mcchae.egloos.com/10913183

http://ubuntuforums.org/showthread.php?t=1568706

Asterisk 설치 방법

Asterisk 설치 방법이 정리가 잘 되어 있음!~

출처 : http://sipjs.com/guides/server-configuration/asterisk/

Guides

Tired of fighting with configs?

Try SIP.js and OnSIP — a perfect pairing for WebRTC!

Configure Asterisk

SIP.js has been tested with Asterisk 11.11.0 without any modification to the source code of SIP.js or Asterisk. Similar configuration should also work for Asterisk 12.

System Setup

Asterisk and SIP.js were tested using the following setup:

Required Packages

Install the following dependencies:

  • wget
  • gcc
  • gcc-c++
  • ncurses-devel
  • libxml2-devel
  • sqlite-devel
  • libsrtp-devel
  • libuuid-devel
  • openssl-devel

Using YUM, all dependencies can be installed with:

yum install wget gcc gcc-c++ ncurses-devel libxml2-devel sqlite-devel libuuid-devel openssl-devel.

Install libsrtp

First try installing libsrtp from the repo.

yum install libsrtp-devel

If libsrtp is not available in the repo install it from source.

  1. cd /usr/local/src/
  2. wget http://srtp.sourceforge.net/srtp-1.4.2.tgz
  3. tar zxvf srtp-1.4.2.tgz
  4. cd /usr/local/src/srtp
  5. ./configure CFLAGS=-fPIC
  6. make && make install

Install Asterisk

  1. cd /usr/local/src/.
  2. Download Asterisk withwget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-11.11.0.tar.gz.
  3. Extract Asterisk: tar zxvf asterisk*.
  4. Enter the Asterisk directory: cd /usr/local/src/asterisk*.
  5. Run the Asterisk configure script:./configure --libdir=/usr/lib64.
  6. Run the Asterisk menuselect tool: make menuselect.
  7. In the menuselect, go to the resources option and ensure that res_srtp is enabled. If there are 3 x’s next to res_srtp, there is a problem with the srtp library and you must reinstall it. Save the configuration (press x).
  8. Compile and install Asterisk: make && make install.
  9. If you need the sample configs you can run make samples to install the sample configs. If you need to install the Asterisk startup script you can run make config.

Setup DTLS Certificates

  1. mkdir /etc/asterisk/keys
  2. Enter the Asterisk scripts directory:cd /usr/local/src/asterisk*/contrib/scripts.
  3. Create the DTLS certificates (replace pbx.mycompany.com with your ip address or dns name, replace My Super Company with your company name):./ast_tls_cert -C pbx.mycompany.com -O "My Super Company" -d /etc/asterisk/keys.

Configure Asterisk For WebRTC

For WebRTC, a lot of the settings that are needed MUST be in thepeer settings. The global settings do not flow down into the peer settings very well. By default, Asterisk config files are located in/etc/asterisk/. Start by editing http.conf and make sure that the following lines are uncommented:

1
2
3
4
5
;http.conf
[general]
enabled=yes
bindaddr=127.0.0.1 ; Replace this with your IP address
bindport=8088 ; Replace this with the port you want to listen on

Change the IP address and port to the IP address of your server and the port that you would like Asterisk to listen for web socket connections on.

Next, edit sip.conf. Here you will set up two peers, one for a WebRTC client and one for a non-WebRTC SIP client. The WebRTC peer requires encryption, avpf, and icesupport to be enabled. In most cases, directmedia should be disabled. Also under the WebRTC client, the transport needs to be listed as ‘ws’ to allow websocket connections. All of these config lines should be under the peer itself; setting these config lines globally might not work.

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
;sip.conf
[general]
realm=127.0.0.1 ; Replace this with your IP address
udpbindaddr=127.0.0.1 ; Replace this with your IP address
transport=udp

[1060] ; This will be WebRTC client
type=friend
username=1060 ; The Auth user for SIP.js
host=dynamic ; Allows any host to register
secret=password ; The SIP Password for SIP.js
encryption=yes ; Tell Asterisk to use encryption for this peer
avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=default ; Tell Asterisk which context to use when this peer is dialing
directmedia=no ; Asterisk will relay media for this peer
transport=udp,ws ; Asterisk will allow this peer to register on UDP or WebSockets
force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11
dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS private key is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS

[1061] ; This will be the legacy SIP client
type=friend
username=1061
host=dynamic
secret=password
context=default

Lastly, set up extensions.conf to allow the two peers to call each other.

1
2
3
4
;extensions.conf
[default]
exten => 1060,1,Dial(SIP/1060) ; Dialing 1060 will call the SIP client registered to 1060
exten => 1061,1,Dial(SIP/1061) ; Dialing 1061 will call the SIP client registered to 1061

Restart Asterisk using service asterisk restart to ensure that the new settings take effect.

Configure SIP.js

Asterisk does not accept Contact headers with the .invaliddomain. When creating a UA, add the configuration parameterhackIpInContact. If you are missing this property you will be able to make calls from WebRTC, but not receive calls through Asterisk will fail.

Additionally this guide will only work with audio calls, Asterisk will reject video calls.

The following configuration example creates a UA for the Asterisk configuration above. Replace the values with the values from your config.

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
var config = {
  // Replace this IP address with your Asterisk IP address
  uri: '1060@127.0.0.1',

  // Replace this IP address with your Asterisk IP address,
  // and replace the port with your Asterisk port from the http.conf file
  ws_servers: 'ws://127.0.0.1:8088/ws',

  // Replace this with the username from your sip.conf file
  authorizationUser: '1060',

  // Replace this with the password from your sip.conf file
  password: 'password',
  
  // HackIpInContact for Asterisk
  hackIpInContact: true,
  
};

var ua = new SIP.UA(config);

// Invite with audio only
ua.invite('1061',{
  audio: true,
  video: false
});
  • Update 10/24/2014 – If you are still having trouble with Asterisk and are using a WebSocket Secure (WSS), you can try using thehackWssInTransport: true parameter in your UA’s configuration. This is new as of commit 32bffbe on the SIP.js Master branch.

Troubleshooting

Firefox 34+ requires SIP.js 0.6.4 or later to interop with FreeSWITCH or Asterisk.

This forum post on troubleshooting WebRTC issues is a great guide for trouble shooting problems with Asterisk.

Asterisk Secure Calling Guide can help you setup dtls certificates.

VMWare 와 Windows Hyper-V 의 충돌..

윈도우에서 어느날 아래와 VMWare가 아래와 같은 메시지를 출력하면서 정상적으로 동작하지 않더군요.

VMware Workstation and Hyper-V are not compatible. Remove the Hyper-V role from the system before running VMware Workstation.

이 경우 원인은 윈도우의 가상화시스템인 Hyper-V 가 설치되어 있기 때문인데, 정지 및 제거 해주면 됩니다.

정지 하는 방법은 도스창 (cmd) 을 관리자 권한으로 실행한 후,

 
bcdedit /set hypervisorlaunchtype off
 
이후 다시 활성화 할 때는 

bcdedit /set hypervisorlaunchtype auto
그리고 항상 명령어를 실행 한 후 재부팅 해야 합니다.

참고 : http://www.ivobeerens.nl/2013/12/16/running-hyper-v-and-vmware-workstation-on-windows-8-x/

리고, 제거 하는 방법은 
제어판 – 프로그램 추가 제거 – Windows 기능 켜고/끄기 에서, “Hyper-V”의 체크를 없애면 됩니다.

Vxworks Error Codes

Decimal  Hexadecimal  Macro Name
0x1  EPERM
0x2  ENOENT
0x3  ESRCH
0x4  EINTR
0x5  EIO
0x6  ENXIO
0x7  E2BIG
0x8  ENOEXEC
0x9  EBADF
10  0xa  ECHILD
11  0xb  EAGAIN
12  0xc  ENOMEM
13  0xd  EACCES
14  0xe  EFAULT
15  0xf  ENOTEMPTY
16  0x10  EBUSY
17  0x11  EEXIST
18  0x12  EXDEV
19  0x13  ENODEV
20  0x14  ENOTDIR
21  0x15  EISDIR
22  0x16  EINVAL
23  0x17  ENFILE
24  0x18  EMFILE
25  0x19  ENOTTY
26  0x1a  ENAMETOOLONG
27  0x1b  EFBIG
28  0x1c  ENOSPC
29  0x1d  ESPIPE
30  0x1e  EROFS
31  0x1f  EMLINK
32  0x20  EPIPE
33  0x21  EDEADLK
34  0x22  ENOLCK
35  0x23  ENOTSUP
36  0x24  EMSGSIZE
37  0x25  EDOM
38  0x26  ERANGE
40  0x28  EDESTADDRREQ
41  0x29  EPROTOTYPE
42  0x2a  ENOPROTOOPT
43  0x2b  EPROTONOSUPPORT
44  0x2c  ESOCKTNOSUPPORT
45  0x2d  EOPNOTSUPP
46  0x2e  EPFNOSUPPORT
47  0x2f  EAFNOSUPPORT
48  0x30  EADDRINUSE
49  0x31  EADDRNOTAVAIL
50  0x32  ENOTSOCK
51  0x33  ENETUNREACH
52  0x34  ENETRESET
53  0x35  ECONNABORTED
54  0x36  ECONNRESET
55  0x37  ENOBUFS
56  0x38  EISCONN
57  0x39  ENOTCONN
58  0x3a  ESHUTDOWN
59  0x3b  ETOOMANYREFS
60  0x3c  ETIMEDOUT
61  0x3d  ECONNREFUSED
62  0x3e  ENETDOWN
63  0x3f  ETXTBSY
64  0x40  ELOOP
65  0x41  EHOSTUNREACH
66  0x42  ENOTBLK
67  0x43  EHOSTDOWN
68  0x44  EINPROGRESS
69  0x45  EALREADY
70  0x46  EWOULDBLOCK
71  0x47  ENOSYS
72  0x48  ECANCELED
74  0x4a  ENOSR
75  0x4b  ENOSTR
76  0x4c  EPROTO
77  0x4d  EBADMSG
78  0x4e  ENODATA
79  0x4f  ETIME
80  0x50  ENOMSG
81  0x51  ERRMAX
196709  0x30065  S_taskLib_NAME_NOT_FOUND
196710  0x30066  S_taskLib_TASK_HOOK_TABLE_FULL
196711  0x30067  S_taskLib_TASK_HOOK_NOT_FOUND
196712  0x30068  S_taskLib_TASK_SWAP_HOOK_REFERENCED
196713  0x30069  S_taskLib_TASK_SWAP_HOOK_SET
196714  0x3006a  S_taskLib_TASK_SWAP_HOOK_CLEAR
196715  0x3006b  S_taskLib_TASK_VAR_NOT_FOUND
196716  0x3006c  S_taskLib_TASK_UNDELAYED
196717  0x3006d  S_taskLib_ILLEGAL_PRIORITY
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
458753  0x70001  S_dsmLib_UNKNOWN_INSTRUCTION
786433  0xc0001  S_ioLib_NO_DRIVER
786434  0xc0002  S_ioLib_UNKNOWN_REQUEST
786435  0xc0003  S_ioLib_DEVICE_ERROR
786436  0xc0004  S_ioLib_DEVICE_TIMEOUT
786437  0xc0005  S_ioLib_WRITE_PROTECTED
786438  0xc0006  S_ioLib_DISK_NOT_PRESENT
786439  0xc0007  S_ioLib_NO_FILENAME
786440  0xc0008  S_ioLib_CANCELLED
786441  0xc0009  S_ioLib_NO_DEVICE_NAME_IN_PATH
786442  0xc000a  S_ioLib_NAME_TOO_LONG
786443  0xc000b  S_ioLib_UNFORMATED
786444  0xc000c  S_ioLib_CANT_OVERWRITE_DIR
851969  0xd0001  S_iosLib_DEVICE_NOT_FOUND
851970  0xd0002  S_iosLib_DRIVER_GLUT
851971  0xd0003  S_iosLib_INVALID_FILE_DESCRIPTOR
851972  0xd0004  S_iosLib_TOO_MANY_OPEN_FILES
851973  0xd0005  S_iosLib_CONTROLLER_NOT_PRESENT
851974  0xd0006  S_iosLib_DUPLICATE_DEVICE_NAME
851975  0xd0007  S_iosLib_INVALID_ETHERNET_ADDRESS
917505  0xe0001  S_loadLib_ROUTINE_NOT_INSTALLED
917506  0xe0002  S_loadLib_TOO_MANY_SYMBOLS
1114113  0x110001  S_memLib_NOT_ENOUGH_MEMORY
1114114  0x110002  S_memLib_INVALID_NBYTES
1114115  0x110003  S_memLib_BLOCK_ERROR
1114116  0x110004  S_memLib_NO_PARTITION_DESTROY
1114117  0x110005  S_memLib_PAGE_SIZE_UNAVAILABLE
1310721  0x140001  S_rt11FsLib_VOLUME_NOT_AVAILABLE
1310722  0x140002  S_rt11FsLib_DISK_FULL
1310723  0x140003  S_rt11FsLib_FILE_NOT_FOUND
1310724  0x140004  S_rt11FsLib_NO_FREE_FILE_DESCRIPTORS
1310725  0x140005  S_rt11FsLib_INVALID_NUMBER_OF_BYTES
1310726  0x140006  S_rt11FsLib_FILE_ALREADY_EXISTS
1310727  0x140007  S_rt11FsLib_BEYOND_FILE_LIMIT
1310728  0x140008  S_rt11FsLib_INVALID_DEVICE_PARAMETERS
1310729  0x140009  S_rt11FsLib_NO_MORE_FILES_ALLOWED_ON_DISK
1310730  0x14000a  S_rt11FsLib_ENTRY_NUMBER_TOO_BIG
1310731  0x14000b  S_rt11FsLib_NO_BLOCK_DEVICE
1441893  0x160065  S_semLib_INVALID_STATE
1441894  0x160066  S_semLib_INVALID_OPTION
1441895  0x160067  S_semLib_INVALID_QUEUE_TYPE
1441896  0x160068  S_semLib_INVALID_OPERATION
1835009  0x1c0001  S_symLib_SYMBOL_NOT_FOUND
1835010  0x1c0002  S_symLib_NAME_CLASH
1835011  0x1c0003  S_symLib_TABLE_NOT_EMPTY
1835012  0x1c0004  S_symLib_SYMBOL_STILL_IN_TABLE
1835020  0x1c000c  S_symLib_INVALID_SYMTAB_ID
1835021  0x1c000d  S_symLib_INVALID_SYM_ID_PTR
2293761  0x230001  S_usrLib_NOT_ENOUGH_ARGS
2424833  0x250001  S_remLib_ALL_PORTS_IN_USE
2424834  0x250002  S_remLib_RSH_ERROR
2424835  0x250003  S_remLib_IDENTITY_TOO_BIG
2424836  0x250004  S_remLib_RSH_STDERR_SETUP_FAILED
2686977  0x290001  S_netDrv_INVALID_NUMBER_OF_BYTES
2686978  0x290002  S_netDrv_SEND_ERROR
2686979  0x290003  S_netDrv_RECV_ERROR
2686980  0x290004  S_netDrv_UNKNOWN_REQUEST
2686981  0x290005  S_netDrv_BAD_SEEK
2686982  0x290006  S_netDrv_SEEK_PAST_EOF_ERROR
2686983  0x290007  S_netDrv_BAD_EOF_POSITION
2686984  0x290008  S_netDrv_SEEK_FATAL_ERROR
2686985  0x290009  S_netDrv_WRITE_ONLY_CANNOT_READ
2686986  0x29000a  S_netDrv_READ_ONLY_CANNOT_WRITE
2686987  0x29000b  S_netDrv_READ_ERROR
2686988  0x29000c  S_netDrv_WRITE_ERROR
2686989  0x29000d  S_netDrv_NO_SUCH_FILE_OR_DIR
2686990  0x29000e  S_netDrv_PERMISSION_DENIED
2686991  0x29000f  S_netDrv_IS_A_DIRECTORY
2686992  0x290010  S_netDrv_UNIX_FILE_ERROR
2686993  0x290011  S_netDrv_ILLEGAL_VALUE
2818049  0x2b0001  S_inetLib_ILLEGAL_INTERNET_ADDRESS
2818050  0x2b0002  S_inetLib_ILLEGAL_NETWORK_NUMBER
2883585  0x2c0001  S_routeLib_ILLEGAL_INTERNET_ADDRESS
2883586  0x2c0002  S_routeLib_ILLEGAL_NETWORK_NUMBER
2949121  0x2d0001  S_nfsDrv_INVALID_NUMBER_OF_BYTES
2949122  0x2d0002  S_nfsDrv_BAD_FLAG_MODE
2949123  0x2d0003  S_nfsDrv_CREATE_NO_FILE_NAME
2949124  0x2d0004  S_nfsDrv_FATAL_ERR_FLUSH_INVALID_CACHE
2949125  0x2d0005  S_nfsDrv_WRITE_ONLY_CANNOT_READ
2949126  0x2d0006  S_nfsDrv_READ_ONLY_CANNOT_WRITE
2949127  0x2d0007  S_nfsDrv_NOT_AN_NFS_DEVICE
2949128  0x2d0008  S_nfsDrv_NO_HOST_NAME_SPECIFIED
2949129  0x2d0009  S_nfsDrv_PERMISSION_DENIED
2949130  0x2d000a  S_nfsDrv_NO_SUCH_FILE_OR_DIR
2949131  0x2d000b  S_nfsDrv_IS_A_DIRECTORY
3014657  0x2e0001  S_nfsLib_NFS_AUTH_UNIX_FAILED
3014658  0x2e0002  S_nfsLib_NFS_INAPPLICABLE_FILE_TYPE
3211265  0x310001  S_errnoLib_NO_STAT_SYM_TBL
3276801  0x320001  S_hostLib_UNKNOWN_HOST
3276802  0x320002  S_hostLib_HOST_ALREADY_ENTERED
3276803  0x320003  S_hostLib_INVALID_PARAMETER
3473409  0x350001  S_if_sl_INVALID_UNIT_NUMBER
3473410  0x350002  S_if_sl_UNIT_UNINITIALIZED
3473411  0x350003  S_if_sl_UNIT_ALREADY_INITIALIZED
3538945  0x360001  S_loginLib_UNKNOWN_USER
3538946  0x360002  S_loginLib_USER_ALREADY_EXISTS
3538947  0x360003  S_loginLib_INVALID_PASSWORD
3604481  0x370001  S_scsiLib_DEV_NOT_READY
3604481  0x370001  S_scsiLib_DEV_NOT_READY
3604482  0x370002  S_scsiLib_WRITE_PROTECTED
3604482  0x370002  S_scsiLib_WRITE_PROTECTED
3604483  0x370003  S_scsiLib_MEDIUM_ERROR
3604483  0x370003  S_scsiLib_MEDIUM_ERROR
3604484  0x370004  S_scsiLib_HARDWARE_ERROR
3604484  0x370004  S_scsiLib_HARDWARE_ERROR
3604485  0x370005  S_scsiLib_ILLEGAL_REQUEST
3604485  0x370005  S_scsiLib_ILLEGAL_REQUEST
3604486  0x370006  S_scsiLib_BLANK_CHECK
3604486  0x370006  S_scsiLib_BLANK_CHECK
3604487  0x370007  S_scsiLib_ABORTED_COMMAND
3604487  0x370007  S_scsiLib_ABORTED_COMMAND
3604488  0x370008  S_scsiLib_VOLUME_OVERFLOW
3604488  0x370008  S_scsiLib_VOLUME_OVERFLOW
3604489  0x370009  S_scsiLib_UNIT_ATTENTION
3604489  0x370009  S_scsiLib_UNIT_ATTENTION
3604490  0x37000a  S_scsiLib_SELECT_TIMEOUT
3604490  0x37000a  S_scsiLib_SELECT_TIMEOUT
3604491  0x37000b  S_scsiLib_LUN_NOT_PRESENT
3604491  0x37000b  S_scsiLib_LUN_NOT_PRESENT
3604492  0x37000c  S_scsiLib_ILLEGAL_BUS_ID
3604492  0x37000c  S_scsiLib_ILLEGAL_BUS_ID
3604493  0x37000d  S_scsiLib_NO_CONTROLLER
3604493  0x37000d  S_scsiLib_NO_CONTROLLER
3604494  0x37000e  S_scsiLib_REQ_SENSE_ERROR
3604494  0x37000e  S_scsiLib_REQ_SENSE_ERROR
3604495  0x37000f  S_scsiLib_DEV_UNSUPPORTED
3604495  0x37000f  S_scsiLib_DEV_UNSUPPORTED
3604496  0x370010  S_scsiLib_ILLEGAL_PARAMETER
3604496  0x370010  S_scsiLib_ILLEGAL_PARAMETER
3604497  0x370011  S_scsiLib_INVALID_PHASE
3604497  0x370011  S_scsiLib_INVALID_PHASE
3604498  0x370012  S_scsiLib_ABORTED
3604498  0x370012  S_scsiLib_ABORTED
3604499  0x370013  S_scsiLib_ILLEGAL_OPERATION
3604499  0x370013  S_scsiLib_ILLEGAL_OPERATION
3604500  0x370014  S_scsiLib_DEVICE_EXIST
3604500  0x370014  S_scsiLib_DEVICE_EXIST
3604501  0x370015  S_scsiLib_DISCONNECTED
3604501  0x370015  S_scsiLib_DISCONNECTED
3604502  0x370016  S_scsiLib_BUS_RESET
3604502  0x370016  S_scsiLib_BUS_RESET
3604503  0x370017  S_scsiLib_INVALID_TAG_TYPE
3604503  0x370017  S_scsiLib_INVALID_TAG_TYPE
3604504  0x370018  S_scsiLib_SOFTWARE_ERROR
3604504  0x370018  S_scsiLib_SOFTWARE_ERROR
3604505  0x370019  S_scsiLib_NO_MORE_THREADS
3604506  0x37001a  S_scsiLib_UNKNOWN_SENSE_DATA
3604507  0x37001b  S_scsiLib_INVALID_BLOCK_SIZE
3670017  0x380001  S_dosFsLib_32BIT_OVERFLOW
3670018  0x380002  S_dosFsLib_DISK_FULL
3670019  0x380003  S_dosFsLib_FILE_NOT_FOUND
3670020  0x380004  S_dosFsLib_NO_FREE_FILE_DESCRIPTORS
3670021  0x380005  S_dosFsLib_NOT_FILE
3670022  0x380006  S_dosFsLib_NOT_SAME_VOLUME
3670023  0x380007  S_dosFsLib_NOT_DIRECTORY
3670024  0x380008  S_dosFsLib_DIR_NOT_EMPTY
3670025  0x380009  S_dosFsLib_FILE_EXISTS
3670026  0x38000a  S_dosFsLib_INVALID_PARAMETER
3670027  0x38000b  S_dosFsLib_NAME_TOO_LONG
3670028  0x38000c  S_dosFsLib_UNSUPPORTED
3670029  0x38000d  S_dosFsLib_VOLUME_NOT_AVAILABLE
3670030  0x38000e  S_dosFsLib_INVALID_NUMBER_OF_BYTES
3670031  0x38000f  S_dosFsLib_ILLEGAL_NAME
3670032  0x380010  S_dosFsLib_CANT_DEL_ROOT
3670033  0x380011  S_dosFsLib_READ_ONLY
3670034  0x380012  S_dosFsLib_ROOT_DIR_FULL
3670035  0x380013  S_dosFsLib_NO_LABEL
3670036  0x380014  S_dosFsLib_NO_CONTIG_SPACE
3670037  0x380015  S_dosFsLib_FD_OBSOLETE
3670038  0x380016  S_dosFsLib_DELETED
3670039  0x380017  S_dosFsLib_INTERNAL_ERROR
3670040  0x380018  S_dosFsLib_WRITE_ONLY
3670041  0x380019  S_dosFsLib_ILLEGAL_PATH
3670042  0x38001a  S_dosFsLib_ACCESS_BEYOND_EOF
3670043  0x38001b  S_dosFsLib_DIR_READ_ONLY
3670044  0x38001c  S_dosFsLib_UNKNOWN_VOLUME_FORMAT
3670045  0x38001d  S_dosFsLib_ILLEGAL_CLUSTER_NUMBER
3735553  0x390001  S_selectLib_NO_SELECT_SUPPORT_IN_DRIVER
3735554  0x390002  S_selectLib_NO_SELECT_CONTEXT
3735555  0x390003  S_selectLib_WIDTH_OUT_OF_RANGE
3801089  0x3a0001  S_hashLib_KEY_CLASH
3866625  0x3b0001  S_qLib_Q_CLASS_ID_ERROR
3997697  0x3d0001  S_objLib_OBJ_ID_ERROR
3997698  0x3d0002  S_objLib_OBJ_UNAVAILABLE
3997699  0x3d0003  S_objLib_OBJ_DELETED
3997700  0x3d0004  S_objLib_OBJ_TIMEOUT
3997701  0x3d0005  S_objLib_OBJ_NO_METHOD
4063233  0x3e0001  S_qPriHeapLib_NULL_HEAP_ARRAY
4128769  0x3f0001  S_qPriBMapLib_NULL_BMAP_LIST
4259841  0x410001  S_msgQLib_INVALID_MSG_LENGTH
4259842  0x410002  S_msgQLib_NON_ZERO_TIMEOUT_AT_INT_LEVEL
4259843  0x410003  S_msgQLib_INVALID_QUEUE_TYPE
4325377  0x420001  S_classLib_CLASS_ID_ERROR
4325378  0x420002  S_classLib_NO_CLASS_DESTROY
4390913  0x430001  S_intLib_NOT_ISR_CALLABLE
4390914  0x430002  S_intLib_VEC_TABLE_WP_UNAVAILABLE
4521985  0x450001  S_cacheLib_INVALID_CACHE
4587521  0x460001  S_rawFsLib_VOLUME_NOT_AVAILABLE
4587522  0x460002  S_rawFsLib_END_OF_DEVICE
4587523  0x460003  S_rawFsLib_NO_FREE_FILE_DESCRIPTORS
4587524  0x460004  S_rawFsLib_INVALID_NUMBER_OF_BYTES
4587525  0x460005  S_rawFsLib_ILLEGAL_NAME
4587526  0x460006  S_rawFsLib_NOT_FILE
4587527  0x460007  S_rawFsLib_READ_ONLY
4587528  0x460008  S_rawFsLib_FD_OBSOLETE
4587529  0x460009  S_rawFsLib_NO_BLOCK_DEVICE
4587530  0x46000a  S_rawFsLib_BAD_SEEK
4587531  0x46000b  S_rawFsLib_INVALID_PARAMETER
4587532  0x46000c  S_rawFsLib_32BIT_OVERFLOW
4653057  0x470001  S_arpLib_INVALID_ARGUMENT
4653058  0x470002  S_arpLib_INVALID_HOST
4653059  0x470003  S_arpLib_INVALID_ENET_ADDRESS
4653060  0x470004  S_arpLib_INVALID_FLAG
4718593  0x480001  S_smLib_MEMORY_ERROR
4718594  0x480002  S_smLib_INVALID_CPU_NUMBER
4718595  0x480003  S_smLib_NOT_ATTACHED
4718596  0x480004  S_smLib_NO_REGIONS
4784129  0x490001  S_bootpLib_INVALID_ARGUMENT
4784130  0x490002  S_bootpLib_INVALID_COOKIE
4784131  0x490003  S_bootpLib_NO_BROADCASTS
4784132  0x490004  S_bootpLib_PARSE_ERROR
4784133  0x490005  S_bootpLib_INVALID_TAG
4784134  0x490006  S_bootpLib_TIME_OUT
4784135  0x490007  S_bootpLib_MEM_ERROR
4784136  0x490008  S_bootpLib_NOT_INITIALIZED
4784137  0x490009  S_bootpLib_BAD_DEVICE
4849665  0x4a0001  S_icmpLib_TIMEOUT
4849666  0x4a0002  S_icmpLib_NO_BROADCAST
4849667  0x4a0003  S_icmpLib_INVALID_INTERFACE
4849668  0x4a0004  S_icmpLib_INVALID_ARGUMENT
4915201  0x4b0001  S_tftpLib_INVALID_ARGUMENT
4915202  0x4b0002  S_tftpLib_INVALID_DESCRIPTOR
4915203  0x4b0003  S_tftpLib_INVALID_COMMAND
4915204  0x4b0004  S_tftpLib_INVALID_MODE
4915205  0x4b0005  S_tftpLib_UNKNOWN_HOST
4915206  0x4b0006  S_tftpLib_NOT_CONNECTED
4915207  0x4b0007  S_tftpLib_TIMED_OUT
4915208  0x4b0008  S_tftpLib_TFTP_ERROR
4980737  0x4c0001  S_proxyArpLib_INVALID_PARAMETER
4980738  0x4c0002  S_proxyArpLib_INVALID_INTERFACE
4980739  0x4c0003  S_proxyArpLib_INVALID_PROXY_NET
4980740  0x4c0004  S_proxyArpLib_INVALID_CLIENT
4980741  0x4c0005  S_proxyArpLib_INVALID_ADDRESS
4980742  0x4c0006  S_proxyArpLib_TIMEOUT
5111809  0x4e0001  S_smPktLib_SHARED_MEM_TOO_SMALL
5111810  0x4e0002  S_smPktLib_MEMORY_ERROR
5111811  0x4e0003  S_smPktLib_DOWN
5111812  0x4e0004  S_smPktLib_NOT_ATTACHED
5111813  0x4e0005  S_smPktLib_INVALID_PACKET
5111814  0x4e0006  S_smPktLib_PACKET_TOO_BIG
5111815  0x4e0007  S_smPktLib_INVALID_CPU_NUMBER
5111816  0x4e0008  S_smPktLib_DEST_NOT_ATTACHED
5111817  0x4e0009  S_smPktLib_INCOMPLETE_BROADCAST
5111818  0x4e000a  S_smPktLib_LIST_FULL
5111819  0x4e000b  S_smPktLib_LOCK_TIMEOUT
5177345  0x4f0001  S_loadEcoffLib_HDR_READ
5177346  0x4f0002  S_loadEcoffLib_OPTHDR_READ
5177347  0x4f0003  S_loadEcoffLib_SCNHDR_READ
5177348  0x4f0004  S_loadEcoffLib_READ_SECTIONS
5177349  0x4f0005  S_loadEcoffLib_LOAD_SECTIONS
5177350  0x4f0006  S_loadEcoffLib_RELOC_READ
5177351  0x4f0007  S_loadEcoffLib_SYMHDR_READ
5177352  0x4f0008  S_loadEcoffLib_EXTSTR_READ
5177353  0x4f0009  S_loadEcoffLib_EXTSYM_READ
5177354  0x4f000a  S_loadEcoffLib_GPREL_REFERENCE
5177355  0x4f000b  S_loadEcoffLib_JMPADDR_ERROR
5177356  0x4f000c  S_loadEcoffLib_NO_REFLO_PAIR
5177357  0x4f000d  S_loadEcoffLib_UNRECOGNIZED_RELOCENTRY
5177358  0x4f000e  S_loadEcoffLib_REFHALF_OVFL
5177359  0x4f000f  S_loadEcoffLib_UNEXPECTED_SYM_CLASS
5177360  0x4f0010  S_loadEcoffLib_UNRECOGNIZED_SYM_CLASS
5177361  0x4f0011  S_loadEcoffLib_FILE_READ_ERROR
5177362  0x4f0012  S_loadEcoffLib_FILE_ENDIAN_ERROR
5242881  0x500001  S_loadAoutLib_TOO_MANY_SYMBOLS
5373953  0x520001  S_bootLoadLib_ROUTINE_NOT_INSTALLED
5439489  0x530001  S_loadLib_FILE_READ_ERROR
5439490  0x530002  S_loadLib_REALLOC_ERROR
5439491  0x530003  S_loadLib_JMPADDR_ERROR
5439492  0x530004  S_loadLib_NO_REFLO_PAIR
5439493  0x530005  S_loadLib_GPREL_REFERENCE
5439494  0x530006  S_loadLib_UNRECOGNIZED_RELOCENTRY
5439495  0x530007  S_loadLib_REFHALF_OVFL
5439496  0x530008  S_loadLib_FILE_ENDIAN_ERROR
5439497  0x530009  S_loadLib_UNEXPECTED_SYM_CLASS
5439498  0x53000a  S_loadLib_UNRECOGNIZED_SYM_CLASS
5439499  0x53000b  S_loadLib_HDR_READ
5439500  0x53000c  S_loadLib_OPTHDR_READ
5439501  0x53000d  S_loadLib_SCNHDR_READ
5439502  0x53000e  S_loadLib_READ_SECTIONS
5439503  0x53000f  S_loadLib_LOAD_SECTIONS
5439504  0x530010  S_loadLib_RELOC_READ
5439505  0x530011  S_loadLib_SYMHDR_READ
5439506  0x530012  S_loadLib_EXTSTR_READ
5439507  0x530013  S_loadLib_EXTSYM_READ
5439508  0x530014  S_loadLib_NO_RELOCATION_ROUTINE
5505025  0x540001  S_vmLib_NOT_PAGE_ALIGNED
5505026  0x540002  S_vmLib_BAD_STATE_PARAM
5505027  0x540003  S_vmLib_BAD_MASK_PARAM
5505028  0x540004  S_vmLib_ADDR_IN_GLOBAL_SPACE
5505029  0x540005  S_vmLib_TEXT_PROTECTION_UNAVAILABLE
5505030  0x540006  S_vmLib_NO_FREE_REGIONS
5505031  0x540007  S_vmLib_ADDRS_NOT_EQUAL
5570561  0x550001  S_mmuLib_INVALID_PAGE_SIZE
5570562  0x550002  S_mmuLib_NO_DESCRIPTOR
5570563  0x550003  S_mmuLib_INVALID_DESCRIPTOR
5570565  0x550005  S_mmuLib_OUT_OF_PMEGS
5570566  0x550006  S_mmuLib_VIRT_ADDR_OUT_OF_BOUNDS
5636097  0x560001  S_moduleLib_MODULE_NOT_FOUND
5636098  0x560002  S_moduleLib_HOOK_NOT_FOUND
5636099  0x560003  S_moduleLib_BAD_CHECKSUM
5636100  0x560004  S_moduleLib_MAX_MODULES_LOADED
5701633  0x570001  S_unldLib_MODULE_NOT_FOUND
5701634  0x570002  S_unldLib_TEXT_IN_USE
5767169  0x580001  S_smObjLib_NOT_INITIALIZED
5767170  0x580002  S_smObjLib_NOT_A_GLOBAL_ADRS
5767171  0x580003  S_smObjLib_NOT_A_LOCAL_ADRS
5767172  0x580004  S_smObjLib_SHARED_MEM_TOO_SMALL
5767173  0x580005  S_smObjLib_TOO_MANY_CPU
5767174  0x580006  S_smObjLib_LOCK_TIMEOUT
5767175  0x580007  S_smObjLib_NO_OBJECT_DESTROY
5832705  0x590001  S_smNameLib_NOT_INITIALIZED
5832706  0x590002  S_smNameLib_NAME_TOO_LONG
5832707  0x590003  S_smNameLib_NAME_NOT_FOUND
5832708  0x590004  S_smNameLib_VALUE_NOT_FOUND
5832709  0x590005  S_smNameLib_NAME_ALREADY_EXIST
5832710  0x590006  S_smNameLib_DATABASE_FULL
5832711  0x590007  S_smNameLib_INVALID_WAIT_TYPE
5963777  0x5b0001  S_m2Lib_INVALID_PARAMETER
5963778  0x5b0002  S_m2Lib_ENTRY_NOT_FOUND
5963779  0x5b0003  S_m2Lib_TCPCONN_FD_NOT_FOUND
5963780  0x5b0004  S_m2Lib_INVALID_VAR_TO_SET
5963781  0x5b0005  S_m2Lib_CANT_CREATE_SYS_SEM
5963782  0x5b0006  S_m2Lib_CANT_CREATE_IF_SEM
5963783  0x5b0007  S_m2Lib_CANT_CREATE_ROUTE_SEM
5963784  0x5b0008  S_m2Lib_ARP_PHYSADDR_NOT_SPECIFIED
5963785  0x5b0009  S_m2Lib_IF_TBL_IS_EMPTY
5963786  0x5b000a  S_m2Lib_IF_CNFG_CHANGED
5963787  0x5b000b  S_m2Lib_TOO_BIG
5963788  0x5b000c  S_m2Lib_BAD_VALUE
5963789  0x5b000d  S_m2Lib_READ_ONLY
5963790  0x5b000e  S_m2Lib_GEN_ERR
6029313  0x5c0001  S_aioPxLib_DRV_NUM_INVALID
6029314  0x5c0002  S_aioPxLib_AIO_NOT_DEFINED
6029315  0x5c0003  S_aioPxLib_IOS_NOT_INITIALIZED
6029316  0x5c0004  S_aioPxLib_NO_AIO_DEVICE
6160385  0x5e0001  S_mountLib_ILLEGAL_MODE
6291457  0x600001  S_loadSomCoffLib_HDR_READ
6291458  0x600002  S_loadSomCoffLib_AUXHDR_READ
6291459  0x600003  S_loadSomCoffLib_SYM_READ
6291460  0x600004  S_loadSomCoffLib_SYMSTR_READ
6291461  0x600005  S_loadSomCoffLib_OBJ_FMT
6291462  0x600006  S_loadSomCoffLib_SPHDR_ALLOC
6291463  0x600007  S_loadSomCoffLib_SPHDR_READ
6291464  0x600008  S_loadSomCoffLib_SUBSPHDR_ALLOC
6291465  0x600009  S_loadSomCoffLib_SUBSPHDR_READ
6291466  0x60000a  S_loadSomCoffLib_SPSTRING_ALLOC
6291467  0x60000b  S_loadSomCoffLib_SPSTRING_READ
6291468  0x60000c  S_loadSomCoffLib_INFO_ALLOC
6291469  0x60000d  S_loadSomCoffLib_LOAD_SPACE
6291470  0x60000e  S_loadSomCoffLib_RELOC_ALLOC
6291471  0x60000f  S_loadSomCoffLib_RELOC_READ
6291472  0x600010  S_loadSomCoffLib_RELOC_NEW
6291473  0x600011  S_loadSomCoffLib_RELOC_VERSION
6356993  0x610001  S_loadElfLib_HDR_READ
6356994  0x610002  S_loadElfLib_HDR_ERROR
6356995  0x610003  S_loadElfLib_PHDR_MALLOC
6356996  0x610004  S_loadElfLib_PHDR_READ
6356997  0x610005  S_loadElfLib_SHDR_MALLOC
6356998  0x610006  S_loadElfLib_SHDR_READ
6356999  0x610007  S_loadElfLib_READ_SECTIONS
6357000  0x610008  S_loadElfLib_LOAD_SECTIONS
6357001  0x610009  S_loadElfLib_LOAD_PROG
6357002  0x61000a  S_loadElfLib_SYMTAB
6357003  0x61000b  S_loadElfLib_RELA_SECTION
6357004  0x61000c  S_loadElfLib_SCN_READ
6357005  0x61000d  S_loadElfLib_SDA_MALLOC
6357007  0x61000f  S_loadElfLib_SST_READ
6357012  0x610014  S_loadElfLib_JMPADDR_ERROR
6357013  0x610015  S_loadElfLib_GPREL_REFERENCE
6357014  0x610016  S_loadElfLib_UNRECOGNIZED_RELOCENTRY
6357015  0x610017  S_loadElfLib_RELOC
6357016  0x610018  S_loadElfLib_UNSUPPORTED
6357017  0x610019  S_loadElfLib_REL_SECTION
6422529  0x620001  S_mbufLib_ID_INVALID
6422530  0x620002  S_mbufLib_ID_EMPTY
6422531  0x620003  S_mbufLib_SEGMENT_NOT_FOUND
6422532  0x620004  S_mbufLib_LENGTH_INVALID
6422533  0x620005  S_mbufLib_OFFSET_INVALID
6488065  0x630001  S_pingLib_NOT_INITIALIZED
6488066  0x630002  S_pingLib_TIMEOUT
6619137  0x650001  S_pppSecretLib_NOT_INITIALIZED
6619138  0x650002  S_pppSecretLib_SECRET_DOES_NOT_EXIST
6619139  0x650003  S_pppSecretLib_SECRET_EXISTS
6684673  0x660001  S_pppHookLib_NOT_INITIALIZED
6684674  0x660002  S_pppHookLib_HOOK_DELETED
6684675  0x660003  S_pppHookLib_HOOK_ADDED
6684676  0x660004  S_pppHookLib_HOOK_UNKNOWN
6684677  0x660005  S_pppHookLib_INVALID_UNIT
6750209  0x670001  S_tapeFsLib_NO_SEQ_DEV
6750210  0x670002  S_tapeFsLib_ILLEGAL_TAPE_CONFIG_PARM
6750211  0x670003  S_tapeFsLib_SERVICE_NOT_AVAILABLE
6750212  0x670004  S_tapeFsLib_INVALID_BLOCK_SIZE
6750213  0x670005  S_tapeFsLib_ILLEGAL_FILE_SYSTEM_NAME
6750214  0x670006  S_tapeFsLib_ILLEGAL_FLAGS
6750215  0x670007  S_tapeFsLib_FILE_DESCRIPTOR_BUSY
6750216  0x670008  S_tapeFsLib_VOLUME_NOT_AVAILABLE
6750217  0x670009  S_tapeFsLib_BLOCK_SIZE_MISMATCH
6750218  0x67000a  S_tapeFsLib_INVALID_NUMBER_OF_BYTES
6815745  0x680001  S_snmpdLib_VIEW_CREATE_FAILURE
6815746  0x680002  S_snmpdLib_VIEW_INSTALL_FAILURE
6815747  0x680003  S_snmpdLib_VIEW_MASK_FAILURE
6815748  0x680004  S_snmpdLib_VIEW_DEINSTALL_FAILURE
6815749  0x680005  S_snmpdLib_VIEW_LOOKUP_FAILURE
6815750  0x680006  S_snmpdLib_MIB_ADDITION_FAILURE
6815751  0x680007  S_snmpdLib_NODE_NOT_FOUND
6815752  0x680008  S_snmpdLib_INVALID_SNMP_VERSION
6815753  0x680009  S_snmpdLib_TRAP_CREATE_FAILURE
6815754  0x68000a  S_snmpdLib_TRAP_BIND_FAILURE
6815755  0x68000b  S_snmpdLib_TRAP_ENCODE_FAILURE
6815756  0x68000c  S_snmpdLib_INVALID_OID_SYNTAX
6881281  0x690001  S_pcmciaLib_BATTERY_DEAD
6881282  0x690002  S_pcmciaLib_BATTERY_WARNING
6946817  0x6a0001  S_dhcpcLib_NOT_INITIALIZED
6946818  0x6a0002  S_dhcpcLib_BAD_DEVICE
6946819  0x6a0003  S_dhcpcLib_MAX_LEASES_REACHED
6946820  0x6a0004  S_dhcpcLib_MEM_ERROR
6946821  0x6a0005  S_dhcpcLib_BAD_COOKIE
6946822  0x6a0006  S_dhcpcLib_NOT_BOUND
6946823  0x6a0007  S_dhcpcLib_BAD_OPTION
6946824  0x6a0008  S_dhcpcLib_OPTION_NOT_PRESENT
6946825  0x6a0009  S_dhcpcLib_TIMER_ERROR
6946826  0x6a000a  S_dhcpcLib_OPTION_NOT_STORED
7012353  0x6b0001  S_resolvLib_NO_RECOVERY
7012354  0x6b0002  S_resolvLib_TRY_AGAIN
7012355  0x6b0003  S_resolvLib_HOST_NOT_FOUND
7012356  0x6b0004  S_resolvLib_NO_DATA
7012357  0x6b0005  S_resolvLib_BUFFER_2_SMALL
7012358  0x6b0006  S_resolvLib_INVALID_PARAMETER
7012359  0x6b0007  S_resolvLib_INVALID_ADDRESS
7143425  0x6d0001  S_muxLib_LOAD_FAILED
7143426  0x6d0002  S_muxLib_NO_DEVICE
7143427  0x6d0003  S_muxLib_INVALID_ARGS
7143428  0x6d0004  S_muxLib_ALLOC_FAILED
7143429  0x6d0005  S_muxLib_ALREADY_BOUND
7143430  0x6d0006  S_muxLib_UNLOAD_FAILED
7143431  0x6d0007  S_muxLib_NOT_A_TK_DEVICE
7143432  0x6d0008  S_muxLib_NO_TK_DEVICE
7143433  0x6d0009  S_muxLib_END_BIND_FAILED
7208961  0x6e0001  S_m2RipLib_IFACE_NOT_FOUND
7340033  0x700001  S_dhcpsLib_NOT_INITIALIZED
7405569  0x710001  S_sntpcLib_INVALID_PARAMETER
7405570  0x710002  S_sntpcLib_INVALID_ADDRESS
7405571  0x710003  S_sntpcLib_TIMEOUT
7405572  0x710004  S_sntpcLib_VERSION_UNSUPPORTED
7405573  0x710005  S_sntpcLib_SERVER_UNSYNC
7471105  0x720001  S_sntpsLib_INVALID_PARAMETER
7471106  0x720002  S_sntpsLib_INVALID_ADDRESS
7536641  0x730001  S_netBufLib_MEMSIZE_INVALID
7536642  0x730002  S_netBufLib_CLSIZE_INVALID
7536643  0x730003  S_netBufLib_NO_SYSTEM_MEMORY
7536644  0x730004  S_netBufLib_MEM_UNALIGNED
7536645  0x730005  S_netBufLib_MEMSIZE_UNALIGNED
7536646  0x730006  S_netBufLib_MEMAREA_INVALID
7536647  0x730007  S_netBufLib_MBLK_INVALID
7536648  0x730008  S_netBufLib_NETPOOL_INVALID
7536649  0x730009  S_netBufLib_INVALID_ARGUMENT
7536650  0x73000a  S_netBufLib_NO_POOL_MEMORY
7602177  0x740001  S_cdromFsLib_ALREADY_INIT
7602179  0x740003  S_cdromFsLib_DEVICE_REMOVED
7602180  0x740004  S_cdromFsLib_SUCH_PATH_TABLE_SIZE_NOT_SUPPORTED
7602181  0x740005  S_cdromFsLib_ONE_OF_VALUES_NOT_POWER_OF_2
7602182  0x740006  S_cdromFsLib_UNNOWN_FILE_SYSTEM
7602183  0x740007  S_cdromFsLib_INVAL_VOL_DESCR
7602184  0x740008  S_cdromFsLib_INVALID_PATH_STRING
7602185  0x740009  S_cdromFsLib_MAX_DIR_HIERARCHY_LEVEL_OVERFLOW
7602186  0x74000a  S_cdromFsLib_NO_SUCH_FILE_OR_DIRECTORY
7602187  0x74000b  S_cdromFsLib_INVALID_DIRECTORY_STRUCTURE
7602188  0x74000c  S_cdromFsLib_INVALID_FILE_DESCRIPTOR
7602189  0x74000d  S_cdromFsLib_READ_ONLY_DEVICE
7602190  0x74000e  S_cdromFsLib_END_OF_FILE
7602191  0x74000f  S_cdromFsLib_INV_ARG_VALUE
7602192  0x740010  S_cdromFsLib_SEMTAKE_ERROR
7602193  0x740011  S_cdromFsLib_SEMGIVE_ERROR
7602194  0x740012  S_cdromFsLib_VOL_UNMOUNTED
7602195  0x740013  S_cdromFsLib_INVAL_DIR_OPER
7602196  0x740014  S_cdromFsLib_READING_FAILURE
7602197  0x740015  S_cdromFsLib_INVALID_DIR_REC_STRUCT
7667713  0x750001  S_loadLib_FILE_READ_ERROR
7667714  0x750002  S_loadLib_REALLOC_ERROR
7667715  0x750003  S_loadLib_JMPADDR_ERROR
7667716  0x750004  S_loadLib_NO_REFLO_PAIR
7667717  0x750005  S_loadLib_GPREL_REFERENCE
7667718  0x750006  S_loadLib_UNRECOGNIZED_RELOCENTRY
7667719  0x750007  S_loadLib_REFHALF_OVFL
7667720  0x750008  S_loadLib_FILE_ENDIAN_ERROR
7667721  0x750009  S_loadLib_UNEXPECTED_SYM_CLASS
7667722  0x75000a  S_loadLib_UNRECOGNIZED_SYM_CLASS
7667723  0x75000b  S_loadLib_HDR_READ
7667724  0x75000c  S_loadLib_OPTHDR_READ
7667725  0x75000d  S_loadLib_SCNHDR_READ
7667726  0x75000e  S_loadLib_READ_SECTIONS
7667727  0x75000f  S_loadLib_LOAD_SECTIONS
7667728  0x750010  S_loadLib_RELOC_READ
7667729  0x750011  S_loadLib_SYMHDR_READ
7667730  0x750012  S_loadLib_EXTSTR_READ
7667731  0x750013  S_loadLib_EXTSYM_READ
7733249  0x760001  S_distLib_NOT_INITIALIZED
7733250  0x760002  S_distLib_NO_OBJECT_DESTROY
7733251  0x760003  S_distLib_UNREACHABLE
7733252  0x760004  S_distLib_UNKNOWN_REQUEST
7733253  0x760005  S_distLib_OBJ_ID_ERROR
7798785  0x770001  S_distNameLib_NAME_TOO_LONG
7798786  0x770002  S_distNameLib_ILLEGAL_LENGTH
7798787  0x770003  S_distNameLib_INVALID_WAIT_TYPE
7798788  0x770004  S_distNameLib_DATABASE_FULL
7798789  0x770005  S_distNameLib_INCORRECT_LENGTH
7864321  0x780001  S_msgQDistGrpLib_NAME_TOO_LONG
7864322  0x780002  S_msgQDistGrpLib_INVALID_OPTION
7864323  0x780003  S_msgQDistGrpLib_DATABASE_FULL
7864324  0x780004  S_msgQDistGrpLib_NO_MATCH
7929857  0x790001  S_msgQDistLib_INVALID_PRIORITY
7929858  0x790002  S_msgQDistLib_INVALID_MSG_LENGTH
7929859  0x790003  S_msgQDistLib_INVALID_TIMEOUT
7929860  0x790004  S_msgQDistLib_NOT_GROUP_CALLABLE
7929861  0x790005  S_msgQDistLib_RMT_MEMORY_SHORTAGE
7929862  0x790006  S_msgQDistLib_OVERALL_TIMEOUT
7995393  0x7a0001  S_if_ul_INVALID_UNIT_NUMBER
7995394  0x7a0002  S_if_ul_UNIT_UNINITIALIZED
7995395  0x7a0003  S_if_ul_UNIT_ALREADY_INITIALIZED
7995396  0x7a0004  S_if_ul_NO_UNIX_DEVICE
8060929  0x7b0001  S_miiLib_PHY_LINK_DOWN
8060930  0x7b0002  S_miiLib_PHY_NULL
8060931  0x7b0003  S_miiLib_PHY_NO_ABLE
8060932  0x7b0004  S_miiLib_PHY_AN_FAIL
8126465  0x7c0001  S_poolLib_ARG_NOT_VALID
8126466  0x7c0002  S_poolLib_INVALID_POOL_ID
8126467  0x7c0003  S_poolLib_NOT_POOL_ITEM
8126468  0x7c0004  S_poolLib_POOL_IN_USE
8126469  0x7c0005  S_poolLib_STATIC_POOL_EMPTY
8192001  0x7d0001  S_setLib_LIB_INIT
8192002  0x7d0002  S_setLib_LIB_NOT_INIT
8192003  0x7d0003  S_setLib_ARG_NOT_VALID
8192004  0x7d0004  S_setLib_OBJ_NOT_IN_SET
8257537  0x7e0001  S_dmsLib_DMS_INIT
8257538  0x7e0002  S_dmsLib_DMS_NOT_INIT
8257539  0x7e0003  S_dmsLib_ARG_NOT_VALID
8257540  0x7e0004  S_dmsLib_NAME_NOT_UNIQUE
8257541  0x7e0005  S_dmsLib_NAME_UNKNOWN
8257542  0x7e0006  S_dmsLib_DRIVER_UNKNOWN
8257543  0x7e0007  S_dmsLib_BASIS_UNKNOWN
8257544  0x7e0008  S_dmsLib_NO_CONNECT
8257545  0x7e0009  S_dmsLib_NO_DISCONNECT
8257546  0x7e000a  S_dmsLib_OBJ_ID_ERROR
8257547  0x7e000b  S_dmsLib_ATTR_NOT_VALID
8257548  0x7e000c  S_dmsLib_NOT_SUPPORTED
8257549  0x7e000d  S_dmsLib_DRIVER_INACTIVE
8257550  0x7e000e  S_dmsLib_INVALID_CLASS
8388609  0x800001  S_igmpRouterLib_NOT_INITIALIZED
8388610  0x800002  S_igmpRouterLib_VIF_OUT_OF_RANGE
8388611  0x800003  S_igmpRouterLib_NO_FREE_VIFS
8388612  0x800004  S_igmpRouterLib_INVALID_PORT_NUM
8388613  0x800005  S_igmpRouterLib_NOT_ALL_IFS_DOWN
8388614  0x800006  S_igmpRouterLib_THRESHOLD_REQUIRED
8454145  0x810001  S_devCfgLib_DCFG_INIT
8454146  0x810002  S_devCfgLib_DCFG_NOT_INIT
8454147  0x810003  S_devCfgLib_PARAM_VAL_NOT_VALID
8454148  0x810004  S_devCfgLib_DEVICE_NOT_FOUND
8454149  0x810005  S_devCfgLib_PARAM_NOT_FOUND
8454150  0x810006  S_devCfgLib_NO_NVRAM_SPACE
8454151  0x810007  S_devCfgLib_NO_NVRAM
8716289  0x850001  S_cbioLib_INVALID_CBIO_DEV_ID
8781824  0x860000  S_eventLib_NULL_TASKID_AT_INT_LEVEL
8781824  0x860000  S_eventLib_NULL_TASKID_AT_INT_LEVEL
8781824  0x860000  S_eventLib_NULL_TASKID_AT_INT_LEVEL
8781824  0x860000  S_eventLib_NULL_TASKID_AT_INT_LEVEL
8781824  0x860000  S_eventLib_NULL_TASKID_AT_INT_LEVEL
8781824  0x860000  S_eventLib_NULL_TASKID_AT_INT_LEVEL
8781824  0x860000  S_eventLib_NULL_TASKID_AT_INT_LEVEL
8847361  0x870001  S_fastPathLib_ALREADY_EXISTS
8847362  0x870002  S_fastPathLib_ALREADY_REGISTERED
8847363  0x870003  S_fastPathLib_INTERNAL_ERROR
8847364  0x870004  S_fastPathLib_INVALID_ARG
8847365  0x870005  S_fastPathLib_INVALID_OBJ
8847366  0x870006  S_fastPathLib_INVALID_PARAMS
8847367  0x870007  S_fastPathLib_INVALID_PROTO
8847368  0x870008  S_fastPathLib_INVALID_STATE
8847369  0x870009  S_fastPathLib_NOT_FOUND
8847370  0x87000a  S_fastPathLib_NOT_INITIALIZED
8912897  0x880001  S_ftpLib_ILLEGAL_VALUE
8912898  0x880002  S_ftpLib_TRANSIENT_RETRY_LIMIT_EXCEEDED
8912899  0x880003  S_ftpLib_FATAL_TRANSIENT_RESPONSE
8913117  0x8800dd  S_ftpLib_REMOTE_SERVER_STATUS_221
8913122  0x8800e2  S_ftpLib_REMOTE_SERVER_STATUS_226
8913153  0x880101  S_ftpLib_REMOTE_SERVER_STATUS_257
8913318  0x8801a6  S_ftpLib_REMOTE_SERVER_ERROR_422
8913321  0x8801a9  S_ftpLib_REMOTE_SERVER_ERROR_425
8913346  0x8801c2  S_ftpLib_REMOTE_SERVER_ERROR_450
8913347  0x8801c3  S_ftpLib_REMOTE_SERVER_ERROR_451
8913348  0x8801c4  S_ftpLib_REMOTE_SERVER_ERROR_452
8913396  0x8801f4  S_ftpLib_REMOTE_SERVER_ERROR_500
8913397  0x8801f5  S_ftpLib_REMOTE_SERVER_ERROR_501
8913398  0x8801f6  S_ftpLib_REMOTE_SERVER_ERROR_502
8913399  0x8801f7  S_ftpLib_REMOTE_SERVER_ERROR_503
8913400  0x8801f8  S_ftpLib_REMOTE_SERVER_ERROR_504
8913416  0x880208  S_ftpLib_REMOTE_SERVER_ERROR_520
8913417  0x880209  S_ftpLib_REMOTE_SERVER_ERROR_521
8913426  0x880212  S_ftpLib_REMOTE_SERVER_ERROR_530
8913446  0x880226  S_ftpLib_REMOTE_SERVER_ERROR_550
8913447  0x880227  S_ftpLib_REMOTE_SERVER_ERROR_551
8913448  0x880228  S_ftpLib_REMOTE_SERVER_ERROR_552
8913449  0x880229  S_ftpLib_REMOTE_SERVER_ERROR_553
8913450  0x88022a  S_ftpLib_REMOTE_SERVER_ERROR_554

iptables 를 이용한 국가별 차단

출처 : 설랑이의 공부 블러그 – http://srzero.tistory.com/104

중국의 짱개 / 이태리 양키 이런놈들이 자꾸 나의 서버를 침입한다.
이놈들을 막기 위해 방화벽을 설치 후 간단한 Script를 돌려 차단하였다.
iptables를 이용하면 간단하게 막을 수가 있다.

iptables를 이용하여 국가별 접속을 차단하는 방법에는 2가지가 있다.
(1) Kernel을 업데이트 한 후 iptables를 이용하는 방법
(2) Script를 이용하는 방법

나는 아직 Kernel Level에서 접근하는 법을 확실히 익히지 못하여 (2) 번 레벨에서 막도록 하겠다.

[1] 접속한 IP찾기
/var/log/auth.log를 뒤져 보면 아래와 같은 메시지가 뜬다.

1 18:Feb 13 13:14:03 xxxxx pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=200.27.62.186
2 22:Feb 13 13:14:07 xxxxx pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=200.27.62.186
3 25:Feb 13 13:14:09 xxxxx pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=200.27.62.186

위에서 얼핏보면 알겠지만 220.27.62.186 에서 자꾸 접속을 시도한다. 저놈이 도대체 어느나라 놈인지 알아보자.

대충 보아하나 칠레쪽 양키놈이다. 아~~~ 내서버에 뭔 볼일이 있다고 ㅠㅠㅠ 이제 저놈을
막도록 하자. 참고적으로 오늘부터 칠레 놈들이 싫어졌다.

[2] 국가별 Network 정보 Download하기
URL : http://geolite.maxmind.com/download/geoip/database/ 
위 URL로 가서 가장 최신으로 업데이트 된 Network 정보를 가져온다.
파일(GeoIPCountryWhois.csv) 을 열어보면 아래와 같다.

     1 “1.0.0.0”,”1.7.255.255″,”16777216″,”17301503″,”AU”,”Australia”
     2 “1.9.0.0”,”1.9.255.255″,”17367040″,”17432575″,”MY”,”Malaysia”
     3 “1.10.10.0”,”1.10.10.255″,”17435136″,”17435391″,”AU”,”Australia”
     4 “1.11.0.0”,”1.11.255.255″,”17498112″,”17563647″,”KR”,”Korea, Republic of”
     5 “1.12.0.0”,”1.15.255.255″,”17563648″,”17825791″,”CN”,”China”
     6 “1.16.0.0”,”1.19.255.255″,”17825792″,”18087935″,”KR”,”Korea, Republic of”
     7 “1.21.0.0”,”1.21.255.255″,”18153472″,”18219007″,”JP”,”Japan”
     8 “1.22.0.0”,”1.23.255.255″,”18219008″,”18350079″,”IN”,”India”
     9 “1.24.0.0”,”1.31.255.255″,”18350080″,”18874367″,”CN”,”China”
    10 “1.33.0.0”,”1.33.255.255″,”18939904″,”19005439″,”JP”,”Japan”
    11 “1.34.0.0”,”1.35.255.255″,”19005440″,”19136511″,”TW”,”Taiwan”
    12 “1.36.0.0”,”1.36.255.255″,”19136512″,”19202047″,”HK”,”Hong Kong”

앞에껀 순번 | startNetwork | EndNetwork | ,,, | 국가 이런 순이다. 그럼 위 정보를 파싱하여
Script를 만들어 보도록 하자.

[3] Script 생성하기

#! /bin/bash
echo “########## IP BLOCK Script START ###########”
# iptables init
sudo iptables -P INPUT ACCEPT
sudo iptables -F
echo “IPTABLES INIT SUCCESS”

BLOCK_LIST_FILE=./GeoIPCountryWhois.csv
echo “BLOCK LIST FILE = $BLOCK_LIST_FILE”

# ADD BLOCK TARGET LIST
BLOCK_TARGET_COUNTRY=”China|France|Chile”

# REGIST BLOCK IP FOR LOOP
for IP_BANDWIDTH in `egrep $BLOCK_TARGET_COUNTRY $BLOCK_LIST_FILE | awk -F, ‘{print $1, $2}’ | awk -F\”  ‘{print $2″-“$4}’`

do
   sudo iptables -I INPUT -p all -m iprange –src-range $IP_BANDWIDTH -j DROP
done

sudo iptables -L
echo “################### IP BLOCK Script END ############# “

위 스크립트는 랑이가 짠것이다. awk를 이해 하고 있다면, 아주 쉽게 만들수 있다.

만약 허용국가만 포함하고 싶을때에는 egrep의 조건을 조금 바꾸어주면된다.

#! /bin/bash
echo “########## IP BLOCK Script START ###########”
# iptables init
sudo iptables -P INPUT ACCEPT
sudo iptables -F
echo “IPTABLES INIT SUCCESS”

BLOCK_LIST_FILE=./GeoIPCountryWhois.csv
echo “BLOCK LIST FILE = $BLOCK_LIST_FILE”

# ADD BLOCK TARGET LIST
ALLOW_TARGET_COUNTRY=”Korea”

# REGIST BLOCK IP FOR LOOP
for IP_BANDWIDTH in `egrep -v $ALLOW_TARGET_COUNTRY $BLOCK_LIST_FILE | awk -F, ‘{print $1, $2}’ | awk -F\” ‘{print $2″-“$4}’`

do
sudo iptables -I INPUT -p all -m iprange –src-range $IP_BANDWIDTH -j DROP
done

sudo iptables -L
echo “################### IP BLOCK Script END ############# “

노란색으로 표현한 부분은 간단한 grep 명령이므로 별도로 설명안해도 될듯하다.

[4] Script 실행

########## IP BLOCK Script START ###########
IPTABLES INIT SUCCESS
BLOCK LIST FILE = ./GeoIPCountryWhois.csv

DROP       all  —  anywhere             anywhere            source IP range 1.202.0.0-1.207.255.255
………
………
………

DROP       all  —  anywhere             anywhere            source IP range 1.12.0.0-1.15.255.255

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
################## IP BLOCK Script END #############

다됐따 ㅋㅋㅋ 요렇게 하면 무사히 작업이 완료된다.

이 글을 쓰니 괜시리 애국심이 막 불타온다. 나도 언젠간 짱깨 / 양키 놈들 서버 들어가서 해집고 다니는 실력자가 되어야 겠다 .ㅋㅋㅋㅋ 이제 중국|프랑스|칠레 의 나쁜시키들이 안들어오겠지? 낼도 로그를 지켜봐야겠당 ㅋㅋ

                                                             – 2011.02.15 랑이씀 –

IPtables 사용법

출처 : 우동 블러그 – http://s2kiess.blog.me/30164008171

1. iptables 기본 명령어

 

 1-1. iptables 기본 명령어 목록

    * -L : 적용 되어 있는 정책 목록을 출력한다.

    * -A : 새로운 정책을 추가한다.

    * -I  : 위치를 선택하여 정책을 삽입한다.

    * -R : 위치를 선택하여 정책을 교환한다.

    * -D : 위치를 선택하여 정책을 제거한다.

    

    * -N : 새로운 체인을 만든다.(INPUT, OUTPUT, FORWARD 외에)

    * -P : 체인에 미리 정의되어 있는 정책을 수정한다.

    * -F : 체인으로 부터 규칙들을 지운다.

    * -Z : 체인의 모든 규칙들의 패킷과 바이트 카운트를 0으로 만든다.

    * -X : 비어있는 체인을 제거한다.

 

1-2. iptables 기본 명령어 사용 예제

    * iptables -L : 적용 시킨 정책 목록 출력

    * iptables -D INPUT 1 : INPUT 체인 첫번째 줄에 있는 정책을 삭제한다. 

 

 

2. iptables 제어 옵션 명령어 

 

 2-1. iptables 제어 옵션 명령어 목록

    * -s : 패킷의 송신지를 제어한다.

    * -d : 패킷의 수신지를 제어한다.

    * -j  : 방화벽을 지난 후 패킷의 상태를 제어한다.

    * -p : 프로토콜을 제어한다.

    * –sport : 송신지 포트를 제어한다.

    * –dport : 수신지 포트를 제어한다.

 

 2-2. iptables 제어 옵션 명령어 사용 예제

    * iptables -A INPUT -s 192.168.0.5 -j DROP : 192.168.0.5로 부터 오는 패킷을 모두 차단한다.

    * iptables -A INPUT -d ! 192.168.0.10 -j ACCEPT : 192.168.0.10를 향해 가는 패킷이 아니라면 허용한다.

    * iptables -A INPUT -p TCP -j ACCEPT : TCP 프로토콜 패킷을 모두 허용한다.

    * iptables -A INPUT -p TCP –dport 80 -j DROP : 80번 포트를 향해가는 TCP 패킷을 차단한다.

 

3. 패킷 상세 내역에 따른 제어 옵션 명령어

 

 3-1. iptables 패킷의 상세 내역에 따른 제어 옵션 목록

    * –tcp-flags : TCP 플래그에 따라 패킷을 제어한다.(첫 번째 인자를 검사하고 두 번째 인자는 설정이 되어야 함)

    * -m state –state : 패킷의 상태와 목적에 따라 제어한다.

        

        ※ -m state 명령어 상태 리스트 ( -m state –state [상태] )

          – NEW : 새로 접속을 시도하는 패킷

          – ESTABLISHED : 접속을 한 상태에 있는 패킷 

          – INVALID : 유효하지 않은 패킷 (보통 DROP된다.)

          – RELATED : 접속에 연관성을 가지는 패킷 ( e.g. FTP 접속 패킷, ICMP 에러 메세지)

       

 3-2. iptables 패킷의 상세 내역 제어옵션 예제

    * iptables -A INPUT -p TCP –tcp-flags SYN,RST,ACK SYN -j DROP : SYN패킷의 set이 1이면 DROP시킨다.

    * iptables -A INPUT -p TCP -m state –state NEW -j DROP : 접속을 시도하는 SYN, ACK 플래그 패킷을 차단한다.