반응형

출처 : 마토커닷컴 | http://matoker.com






[Apache] You don't have permission to access / on this server  Linux / Computing 

2013/11/20 14:29

복사http://matoker.com/30179862051

전용뷰어 보기

설치환경

 OS

Cent OS 6.3

 

 

Forbidden
You don't have permission to access / on this server

 

 

위 에러를 직역을 해봐도 단순하게 알수 있지만, 접근 권한이 없다는 내용입니다.

 

아파치 세팅을 무난히 마쳤다고 생각되었음에도 불구하고 위와 같이 메시지가 뜰 경우에

아래의 내용들을 순차적으로 확인 해 볼 필요가 있습니다.

 

 

 

1. 아파치 설정내에 Directory 권한이 제대로 설정이 되어 있는지?

 

아파치 2.2와 아파치 2.4 설정 방법이 다릅니다. 아래의 포스팅을 참고하시기 바랍니다.

 

[Apache] 아파치 2.2 / 아파치 2.4 접근권한 비교

http://matoker.com/30185816358

 

 

 

2. 홈디렉토리의 user/group 이 제대로 부여되었는지? 

 

예를 들어 /home/projects/test_web 이라는 경로를 홈디렉토리로 지정하였는데

test_web 디렉토리 자체는 user/group 이 현재 아파치가 접근 가능하게 지정되어 있는데

/home 또는 /home/projects 디렉토리 자체는 아파치가 접근 가능한 user/group 이 아닌 경우에도

위와 같은 에러가 발생할 수 있습니다.

 

사용자 및 퍼미션을 확인해 보는 명령어는 ls -al 또는 ll 명령어입니다.

 

디렉토리 user/group 을 변경하는 명령어는 아래와 같습니다.

 

chown -R [user명] [디렉토리명]

chgrop -R [group명] [디렉토리명]

chown -R [user명]:[group명] [디렉토리명]

 

-R 옵션은 해당 디렉토리 이하의 모든 폴더 및 파일에 일괄 적용하겠다는 뜻입니다.

 

 

 

3. 홈디렉토리의 퍼미션이 맞게 부여되었는지?

 

사용자 및 퍼미션을 확인해 보는 명령어는 ls -al 또는 ll 명령어입니다.

 

chmod -R [권한] [디렉토리명]

 

권한은 일반적으로 755 정도로 본인의 상황에 맞게 설정하시면 됩니다.

 

 

 

4. SELLINUX 설정이 제대로 안되어 있는 경우


아파치 httpd.conf 에서 Directory 설정을 했음에도 불구하고

접근 권한이 없다고 위처럼 메시지가 나오는 경우 SELLINUX 설정을 의심해 볼 필요가 있습니다.

 

"SELLINUX 란" 하고 검색을 해보면 자세한 설명이 나옵니다.

 

간단하게 말하자면 리눅스의 보안을 강화하기 위해서 최신 리눅스에는 기본적으로 다 탑재가 되어 있는 프로그램입니다.

 

이로 인해 기존에 알고 있던 지식을 바탕으로 세팅을 해주어도 실행이 안되거나, 권한이 없다고 나오는 경우가 있습니다.

이럴때 SELLINUX가 실행되고 있어서인지 확인해 볼 필요가 있습니다.


SELINUX를 사용하지 않으려면

 

setenforce 0

 

이라고 입력하면 사용하지 않게 됩니다.

 

setenforce 1

 

이라고 입력하면 사용하게 됩니다.

위 명령어는 재부팅을 하게 되면 설정값에 따라 다시 적용됩니다.

 

영구적으로 설정하려면 아래의 파일에서 수정을 합니다.

 

vi /etc/sysconfig/selinux

 

 

SELINUX=disabled

 

로 변경합니다.


만일 부분적으로 특정 디렉토리만 제대로 동작하게 하기 위해서는

 

restorecon -rv [디렉토리명]

 

(SELLINUX가 인지 가능하게 라벨링을 복구해주는 작업.. 인듯합니다만 확실하진 않습니다.)


이상으로 포스팅을 마칩니다.

 


마토커닷컴 | http://matoker.com


반응형
출처 : http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_%EC%A2%85%EB%A5%98_%ED%99%95%EC%9D%B8,_%EB%A6%AC%EB%88%85%EC%8A%A4_%EB%B2%84%EC%A0%84_%ED%99%95%EC%9D%B8

리눅스 종류 확인하기
리눅스 버전 확인하기
리눅스 배포판 확인하기

개요

방법 1: rpm

rpm -qa *-release
실행예시 (CentOS 6.2)
[root@zetawiki ~]# rpm -qa *-release
centos-release-6-2.el6.centos.7.x86_64
실행예시 (Fedora 11 Leonidas)
[root@zetawiki ~]# rpm -qa *-release
fedora-release-11-1.noarch
실행예시 (Oracle Enterprise Linux Server 5.5)
[root@zetawiki ~]# rpm -qa *-release
enterprise-release-5-0.0.22
실행예시 (SUSE Linux Enterprise Server 11)
zetawiki:~ # rpm -qa *-release
sles-release-11.1-1.152
lsb-release-2.0-1.2.18

방법 2: /etc/*-release

ll /etc/*-release
cat /etc/*-release | uniq
실행예시 (CentOS 6.2)
[root@zetawiki ~]# ll /etc/*-release
-rw-r--r--. 1 root root 27 Dec  9  2011 /etc/centos-release
lrwxrwxrwx. 1 root root 14 May  7  2012 /etc/redhat-release -> centos-release
lrwxrwxrwx. 1 root root 14 May  7  2012 /etc/system-release -> centos-release
[root@zetawiki ~]# cat /etc/*-release | uniq
CentOS release 6.2 (Final)
실행예시 (Fedora 11 Leonidas)
[root@zetawiki ~]# ll /etc/*-release
-rw-r--r--. 1 root root 29 2009-05-12 07:45 /etc/fedora-release
lrwxrwxrwx. 1 root root 14 2009-10-29 14:53 /etc/redhat-release -> fedora-release
lrwxrwxrwx. 1 root root 14 2009-10-29 14:53 /etc/system-release -> fedora-release
[root@zetawiki ~]# cat /etc/*-release | uniq
Fedora release 11 (Leonidas)
실행예시 (Oracle Enterprise Linux Server 5.5)
[root@zetawiki ~]# ll /etc/*-release
-rw-r--r-- 1 root root 64 Apr  2  2010 /etc/enterprise-release
-rw-r--r-- 1 root root 54 Apr  2  2010 /etc/redhat-release
[root@zetawiki ~]# cat /etc/*-release | uniq
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
실행예시 (SUSE Linux Enterprise Server 11)
zetawiki:~ # ll /etc/*-release
-rw-r--r-- 1 root root  69 May 12  2010 /etc/SuSE-release
-rw-r--r-- 1 root root 110 May  6  2010 /etc/lsb-release
zetawiki:~ # cat /etc/*-release | uniq
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
실행예시 (Ubuntu 12.04.3 LTS)
root@ubuntu:~# ll /etc/*-release
-rw-r--r-- 1 root root 106 Aug 17 14:46 /etc/lsb-release
-rw-r--r-- 1 root root 141 Aug 17 21:47 /etc/os-release
root@ubuntu:~# cat /etc/*-release | uniq
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"
NAME="Ubuntu"
VERSION="12.04.3 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"
VERSION_ID="12.04"

방법 3: /etc/issue

명령어
cat /etc/issue
  • 배포판의 버전을 가장 쉽게 확인할 수 있는 방법이다.
  • 보안 등의 이유로 다른 내용으로 바뀌어 있는 경우도 있다.
실행예시 (CentOS 5.7)
[root@zetawiki ~]# cat /etc/issue
CentOS release 5.7 (Final)
Kernel \r on an \m
실행예시 (Fedora 11)
[root@zetawiki ~]# cat /etc/issue
Fedora release 11 (Leonidas)
Kernel \r on an \m (\l)
실행예시 (Oracle Enterprise Linux 5.5)
[root@zetawiki ~]# cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Kernel \r on an \m
실행예시 (SUSE Linux Enterprise Server 11)
zetawiki:~ # cat /etc/issue
 
Welcome to SUSE Linux Enterprise Server 11 SP1  (x86_64) - Kernel \r (\l).
실행예시 (Ubuntu 12.04.3 LTS)
root@ubuntu:~# cat /etc/issue
Ubuntu 12.04.3 LTS \n \l

방법 4: uname (커널 버전)

 리눅스 커널 버전 확인 문서를 참고하십시오.
uname -r
실행예시 (Fedora 11, VM)
[root@zetawiki ~]# uname -r
2.6.30.10-105.2.23.fc11.x86_64
실행예시 (CentOS 5.7, Xen VM)
[root@zetawiki ~]# uname -r
2.6.18-274.3.1.el5xen
실행예시 (SUSE Linux Enterprise Server 11, Xen VM)
zetawiki:~ # uname -r
2.6.32.59-0.7-xen
실행예시 (Ubuntu 12.04.3 LTS)
root@ubuntu:~# uname -r
3.8.0-29-generic
root@ubuntu:~# uname -a
Linux ubuntu 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

방법 5: /proc/vesrion (커널 버전)

[root@CentOS64 ~]# cat /proc/version
Linux version 2.6.32-358.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Fri Feb 22 00:31:26 UTC 2013

같이 보기


반응형

centos 6.3 minimal 설치시 php-mcrypt 설치

centos 6.3 minimal 설치시 php-mcrypt가 설치 되지 않습니다.
yum으로 찾아 보아도 없다고 나오는군요..
왜 빠졌는지는 모르지만 구글링하다 발견한 내용을 포스팅 합니다.

001
002
003
wget http://ftp.neowiz.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum install php-mcrypt
TAGS





출처 : http://www.9th.kr/?p=112

반응형



다음 위치에  node.module 의      $variables['display_submitted'] = 값을 FALSE; 로 수정하면 됩니다.


위치 : /var/www/html/070uplus/contact/modules/node


  // Display post information only on certain node types.

  if (variable_get('node_submitted_' . $node->type, TRUE)) {

    $variables['display_submitted'] = FALSE;

    $variables['submitted'] = t('Submitted by !username on !datetime', array('!$

    $variables['user_picture'] = theme_get_setting('toggle_node_user_picture') $

  }

  else {                 

    $variables['display_submitted'] = FALSE;

    $variables['submitted'] = '';

    $variables['user_picture'] = '';





출처 : https://www.drupal.org/node/1193888


changing 1st occurence of
$variables['display_submitted'] = TRUE;
to
$variables['display_submitted'] = FALSE;
in
drupal7/modules/node/node.module
as shown below works for me.

  // Display post information only on certain node types.
  if (variable_get('node_submitted_' . $node->type, TRUE)) {
    //$variables['display_submitted'] = TRUE;
    $variables['display_submitted'] = FALSE;
    $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['date']));
    $variables['user_picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', array('account' => $node)) : '';
  }
  else {
    $variables['display_submitted'] = FALSE;
    $variables['submitted'] = '';
    $variables['user_picture'] = '';
  }

or if leave as TRUE can change what is printed by altering the

$variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['date']));

line.


반응형

http://www.freepbx.org/support/documentation/howtos/howto-resolving-audio-problems


Resolving Audio Problems

One of the most common issues to plague new users is the lack of audio. Calls appear to complete, and show up in the call detail, etc. but nothing is heard by one or both of the parties on the conversation. This section of the wiki will be devoted to such problems and their solutions, and I encourage others to add to it as you encounter problems and then discover the solution, particularly if it's not posted here already.

NAT issues

Perhaps the most common problem encountered is one-way audio and 99% of the time this is caused by a NAT firewall. So here are the steps you must take to configure FreePBX to work behind a NAT firewall.

Make sure you have a resolvable address on the Internet.

If you don't want to pay a few bucks to get a static IP address, and are served by an ISP that periodically changes your IP address, then get a free account with DynDNS(link is external) or some similar service. Your router may already have built-in support for one or more of these services, if so, use one that your router supports and then configure your router to automatically update your dynamic address when your ISP changes your IP address. Failing that, you can set up an updater program such as inadyn, there are instructions for doing that at this blog page(link is external).

Make use that your system knows its own name.

Once you get a DynDNS or other address that identifies your system on the Internet, put it in your etc/hosts file. For example, if you are assigned foo.dyndns.net, then open etc/hosts in your favorite text editor (nano, or Midnight Commander's editor will do - use mc -a from the command prompt to access Midnight Commander) and look for this line:

127.0.0.1 localhost

DO NOT REMOVE OR CHANGE THAT LINE. On a NEW line directly underneath it, place this line:

127.0.0.1 foo.dyndns.net

But substitute YOUR address, of course.

Add some information to your /etc/asterisk/sip_nat.conf file

If this file doesn't exist you'll have to create it, but make sure that the ownership and permissions match those of sip.conf and other files in that directory. You can use the command

touch /etc/asterisk/sip_nat.conf

To create the file. I personally use Midnight Commander's "Advanced CHOWN" feature to check and change permissions; if you are a true Linux geek you probably already have a preferred method.

Now edit the file and insert AT LEAST these two lines:

externip=your.external.dotted.IPaddess

localnet=192.168.0.0/255.255.255.0

The above localnet line assumes that your local network uses 192.168.0.x addresses, but if it uses something else, make the appropriate substitution.

Personally I use four lines, as follows:

nat=yes

externip=your.external.dotted.IPaddess

fromdomain=foo.dyndns.com

localnet=192.168.0.0/255.255.255.0

The "fromdomain" line would contain your public address, while "externip" contains the numeric IP address your ISP has assigned you (which hopefully doesn't change often).

If your ISP does change IP addresses on you frequently, and for some reason you can't/won't change ISP's or get a static IP address, and you are running at least Asterisk 1.2.x then there is an alternative way to specify your address to the system (however, note that some users find that this simply does not work as expected):

externhost=foo.dyndns.net

externrefresh=10

These are used IN PLACE OF the "externip" (and "fromdomain", if you have included that) lines. DO NOT use both "externhost" and "externip." Supposedly, "externhost" will cause Asterisk to perform DNS queries periodically, but they say it is "Not recommended for production environments!" and suggest using "externip" instead. "externrefresh" tells the system how often to refresh "externhost". If this method does not work for you, see the Addendum at the bottom of this document for another approach.

Reload SIP

After you have added whichever lines you need in sip_nat.conf, go to the Command Line Interface and type

sip reload

And hit enter. Alternately you could restart Asterisk, but that will interrupt any calls that are in progress.

Open the SIP and RTP ports to your Asterisk server

You must make sure that you open the correct UDP ports in your router's firewall and pointed at your Asterisk server. For SIP protocol, open UDP (NOT TCP) port 5060 (SIP) AND ports 10001-20000 (RTP, which must also be defined in /etc/asterisk/rtp.conf, see below). All these ports are UDP, opening the TCP ports will NOT help anything and may expose your system needlessly. While you are in your firewall configuration, you may as well also open UDP port 4569 (IAX), since sooner or later you'll probably want to accept IAX connections.

Check your /etc/asterisk/rtp.conf file

It should contain these two lines:

rtpstart=10001

rtpend=20000

If the port values are any different, change them. N.B. These MUST match what you opened in your firewall, and DO NOT start with port 10000, because it conflicts with usage in Webmin (and despite what anyone may tell you, Webmin does use UDP port 10000 in addition to TCP port 10000 - it uses the UDP port in an attempt to discover and communicate with other Webmin servers running on your network. So don't believe anyone who tells you that Webmin only uses TCP port 10000 and therefore there is no conflict).

Some people feel the need to open fewer than 10,000 ports. I don't recommend this because six months from now when you start having audio problems you may not remember that you opened fewer than the recommended number of ports, and may spend hours troubleshooting the issue. But if you are simply obsessive about open ports, remember that each open SIP connection may require as many as FOUR concurrent ports, so don't cut it down to some ridiculously small number. For the non-paranoid, I suggest sticking with the recommendations above (and remember, if a hacker is looking at ports on your system, he's going to scan ALL of them, so having fewer UDP ports open really doesn't make you any more secure).

CODEC issues

Whenever a call is placed, both ends of the call must agree on the codecs they want to use. If one end speaks only ulaw and the other end refuses to communicate using anything other than gsm, no communication is going to take place. This is why I would recommend that beginners always allow ulaw (also known as g.711u) and alaw (also known as g.711a) unless specifically instructed not to but whomever you are connecting to. There are actually five different places that codecs can be specified:

  • At an endpoint/device (phone or ATA), typically in the device's configuration.
  • In a FreePBX EXTENSION configuration, however it's best to leave those settings blank in most cases.
  • In a FreePBX TRUNK configuration, using allow= statements coupled with disallow=all. If these are omitted, then the defaults in sip.conf and iax.conf are used.
  • In sip.conf, using allow= statements coupled with disallow=all. These are the system defaults for SIP calls but can be overridden by trunk or extension settings.
  • In iax.conf, using allow= statements coupled with disallow=all. These are the system defaults for IAX calls but can be overridden by trunk or extension settings.

Note that as of Asterisk 1.4, the order of allow and disallow statements is important. If you use a disallow=all statement, it must be placed before any allow statements, because if it is placed after any allow statements it will negate them. This was not the case in Asterisk 1.2 and earlier versions.

Asterisk will attempt to translate formats if the codecs are available on the system and allowed for that leg of the call. So if you have a trunk that only allows gsm but your extensions will only communicate in ulaw, that's not a problem as long as you have allowed gsm in the trunk configuration. To see the available codecs and translations, type core show translation (or just show translation in Asterisk 1.2 and earlier) from the Command Line Interface - if there is a number showing between two codecs in the grid then translations are possible, if a single line (and it's not to the same codec) then translations are not possible, usually because one of the codecs isn't installed on the system.

Missing files/incorrect paths

If calling into an IVR or voicemail box, and the expected recording isn't played, it's possible that it's missing or not in the expected location. Did you use the System Recordings module to import the recording? If not, are you sure it's in the correct location?

Permissions/ownership issues

This most commonly occurs when people copy audio files directly onto the system and forget that it's a Linux box and that Linux is finicky about file permissions and ownership. If permissions or ownership aren't correct, Asterisk will be unable to access the file, and therefore can't play it. One thing you can try to resolve this is to run the following from the Linux command prompt:

amportal chown

This is supposed to set appropriate permissions on files used by Asterisk

Incorrect audio format

Sometimes people create system audio files using an external sound file editor, such asAudacity(link is external), in order to get better sound quality. What they don't realize is that Asterisk is very picky about the format of audio files it will play back. For example, if the file is .wav file format, Asterisk wants a file recorded at 8000 Hz, 16 bit, monaural (a.k.a. single channel) format and if you directly upload a file in any other format, the CLI may show that the file is being played, but callers hear nothing. If normal system files play correctly but the files you've created do not, check the format, especially if you've directly copied it to a particular location on the system instead of importing it with the System Recordings module.

Hardware issues

Yes, even a hardware problem can cause audio failures. In one case, a T1 card had been installed in the system but not configured, and that stopped all recorded audio from being played. So if all else fails, look for any unconfigured or misconfigured hardware device, particularly if it's a zaptel card (it appears that having ANY non-configured zaptel card in a system may cause problems with audio output).

Addendum: A Perl script to rewrite sip_nat.conf when your IP address changes

The following is a Perl script that checks your IP address using whatismyip.com, and rewrites /etc/asterisk/sip_nat.conf if the external IP address has changed. Note that you may have to install additional Perl modules, and you WILL need to modify one line in the script:

#!/usr/bin/perl

#
# This program gets the current IP address (as assigned by the ISP) from
# whatismyip.org and modifies /etc/asterisk/sip_nat.conf if the external IP
# address has changed. You can Use Webmin to install any missing Perl
# modules, and to invoke the script as cron job that runs every 5 minutes
#
use strict;
use warnings;
use WWW::Mechanize;
use Tie::IxHash;
use Data::Validate::IP qw(is_public_ipv4);
my $s_filepath = "/etc/asterisk/sip_nat.conf";
my $mech = WWW::Mechanize->new( autocheck => 1 );
$mech->get('http://whatismyip.com/automation/n09230945.asp');
$mech->success or die 'Cannot connect to http://whatismyip.com/automation/n09230945.asp (link is external)';
my ($ip) = ($mech->content() =~ /(\d+\.\d+\.\d+\.\d+)/);
if (is_public_ipv4($ip)) {
	tie my %configvars, 'Tie::IxHash';
# The 'fromdomain' (& possibly 'localnet') values in the next line MUST be changed
	%configvars = ('nat' => 'yes', 'externip' => '0.0.0.0','fromdomain' => 'foo.dyndns.com','localnet' => '192.168.0.0/255.255.255.0') ;
	open IN,"<$s_filepath";
	while (my $i = ) {
		chop $i;
		if ($i =~ /=/) {
			$i =~ s/\s//g;
			my ($key,$value) = split /=/,$i;
			$configvars{$key} = $value;
		}
	}
	close IN;
	if ($configvars{'externip'} ne $ip) {
		$configvars{'externip'} = $ip;
		open OUT,">$s_filepath";
		while (my ($key, $value) = each %configvars) {
			select OUT;
			print "$key=$value\n";
		};
		select STDOUT;
		close OUT;
		`/usr/sbin/asterisk -rx reload`;
	};
};

Please be sure to change foo.dyndns.com to YOUR dynamic IP address, and192.168.0.0/255.255.255.0 to a value consistent with your local network address range (if you are not using addresses in the 192.168.0.x range).

It is suggested that you place the above script in your /var/lib/asterisk/agi-bin/ directory, make sure the permissions and ownership are set correctly (make the script executable!), backup your existing /etc/asterisk/sip_nat.conf file, and then as a test invoke the script from a command prompt, e.g. (assuming you name the script checkip.pl):

cd /var/lib/asterisk/agi-bin
perl checkip.pl

If the script exits without printing any error messages, check /etc/asterisk/sip_nat.conf to make sure that the all of the lines in it contain correct values. If all looks as it should, you can can then set up a cron job to run the script every five minutes. I did this using Webmin'sSystem|Scheduled Cron Jobs page, but you may prefer to do it from the command line. If you get any errors about missing Perl modules when you run the script, these will have to be installed (there are Webmin modules that can do this also - look for one called "Perl Modules" or "CPAN").

One other note - if this script is running and sip_nat.conf gets deleted for any reason, the script will probably recreate it but with the wrong ownership and permissions - so if you ever accidentally delete that file, and after that Asterisk acts like it isn't there, check the permissions and ownership to make sure it is the same as for the other sip_*.conf files in /etc/asterisk.

반응형

List of open source captive portal software and network access control (NAC)

 
 
 
 
 
 
i
 
9 Votes


I have listed here some open source captive portal software and network access control (NAC) systems.

Last updated on : 19 Sep 2014

Open Source/Free

  1. ChilliSpot – http://www.chillispot.info
  2. Wifidog – http://dev.wifidog.org
  3. PacketFence – http://www.packetfence.org
  4. HotSpotPA – http://www.hotspotpa.com
  5. CoovaChilli – http://coova.org
  6. Utangle – http://www.untangle.com
  7. pfSense – http://www.pfsense.org
  8. PepperSpot – http://pepperspot.sourceforge.net
  9. Zeroshell – http://www.zeroshell.net/eng/
  10. m0n0wall – http://m0n0.ch
  11. Kattive – http://www.kattive.it
  12. EasyHotSpot – http://easyhotspot.inov.asia/
  13. GRASE Hotspot – http://grasehotspot.org
  14. BrazilFW – http://www.brazilfw.com.br

Closed Source/Paid

  1. FirstSpot - http://patronsoft.com/firstspot/ (for Windows)
  2. antamedia – http://www.antamedia.com (hotspot manager for windows)
  3. polkaspots – http://polkaspots.com/

Disclaimer: I have collected the list of captive portals/firewalls when I was working on a network products, but no longer. So I rarely maintain this list and the list is here just a information sharing. If you found any thing is not correct kindly post it in comment, so I can correct it.

반응형


the partition is misaligned by 512 bytes. this may result in very poor performance 

SSD를 새로 달고 나서 나오는 에러 해결하기



참고 : https://www.linux.co.kr/home/lecture/?leccode=10644

출처 : http://star4u.org/blog/?p=480


리눅스에서 GNU Parted로 4K 섹터 디스크 파티션 정렬하기

기존 디스크는 512바이트의 섹터를 가지는게 보통이었고 이건 오랫동안 상식으로 통했다.
하지만 최근 기술의 발달로 4096바이트의 섹터를 가지고 있는 디스크가 나오게 되었다.
최근에 나오는 고용량 하드디스크는 4096바이트의 섹터일 확률이 크다.

4K 섹터 디스크 관련해서는 아래의 URL을 참조하면 된다.
https://www.ibm.com/developerworks/kr/library/l-4kb-sector-disks/

http://www.seagate.com/docs/pdf/ko-KR/whitepaper/tp613_transition_to_4k_sectors.pdf

여기서는 Gnu Parted를 이용해 리눅스에서 4K 섹터의 디스크를 사용하는 방법을 알아본다.

parted를 실행하고 print 해보면 현재의 디스크 정보가 출력된다.

$ sudo parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) print
Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

현재 아무런 파티션이 없는 상태이다.
Sector size를 보면 논리적 512바이트, 물리적 4096바이트인걸 알 수 있다.

처음(0)부터 끝(100%)까지 파티션을 생성해본다.
(parted) mkpart primary 0 100%
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel?

위와 같은 경고 메시지가 나온다.
Ignore를 선택해서 강제로 파티션을 생성해 보았다.

(parted) print
Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
1      17.4kB  3001GB  3001GB               primary

align-check로 정렬이 되었는지 보자.
(parted) align-check optimal 1
1 not aligned

1번 파티션이 정렬되지 않았다고 나온다.
맨 처음 URL을 읽어봤다면 MS Windows와의 호환성을 위해서 보통 2048섹터부터 시작하게 파티션 생성을 한다는 문구를 보았을 것이다.
그럼 어떻게 2048섹터부터 파티션을 생성할 수 있는지 알아보자.

(parted) mkpart primary 1 100%
(parted) print
Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
1      1049kB  3001GB  3001GB               primary

parted를 실행하면 기본 unit 단위는 compact이다.
섹터 단위로 변경하고 정보를 보자.

(parted) unit s
(parted) print
Model: ATA ST3000DM001-9YN1 (scsi)
Disk /dev/sdb: 5860533168s
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start  End          Size         File system  Name     Flags
1      2048s  5860532223s  5860530176s               primary

2048섹터부터 시작하도록 파티션이 생성되었다.
실제로 정렬이 되었는지 align-check로 알아보자.

(parted) align-check optimal 1
1 aligned

1번 파티션이 정렬 되었다.

여기까지 읽어봤다면 알 수 있겠지만 unit을 섹터로 변경하고 2048섹터부터 시작하도록 파티션 생성을 해도 된다.


반응형

CentOS 에 PuTTY로 자동로그인하고 알아본 결과 다음과 같이 하면 처리 되었습니다.


1. 리눅스 터미널에서 다음 명령어로 Key파일 생성 (저장 위치는 기본값으로 두고 엔터/인증키 암호를 새로 생성)

ssh-keygen -t rsa


2. 기본 저장위치에 id_rsa와 id_rsa.pub 인증 키 파일이 생성된것을 확인할 수 있습니다.

id_rsa는 개인키 : 클라이언트가 해당 키를 가지고 로그인해야 함.

id_rsa.pub는 공개키 : 서버에 위치하여 함. 파일명은 authorized_keys가 되어야 함.


cp id_rsa.pub authorized_keys


3. puttygen.exe를 실행한 후 "Load an existing private key file" Load를 클릭한 후 id_rsa 개인키를 불러 옵니다.

   - 암호 입력

   - Key passphrase 항목 삭제

   - Save private key 를 눌러 PuTTY가 사용하는 포멧으로 저장 


4. PuTTY에서 설정

 - Connection > Data 텝에 Auto-login username항목에 로그인 id입력

 - Connection > SSH > Auth 텝에 Private Key file for authentication > Browse를 클릭하여 3번에서 저장한 Private key를 오픈.

 - Session에 HostName/Port 입력

 - Saved Sessions 항목에 이름 입력 후 Save

 - Saved Sessions 항목에 저장한 Session 이름 클릭 후 Load하면 자동 로그인 됩니다.


개인 키/공개 키 파일이 분실되면 해킹의 우려가 있기 때문에 주의해야 합니다.


참고 : 

http://badayak.com/3353

https://kldp.org/node/28907


+ Recent posts