프로그램 사용/nfs2011. 7. 29. 11:51
NFS는 보안상의 문제가 있어서 되도록이면 외부접속은 하지 않는게 정석이지만,
꼭 해야 한다면 다음의 절차를 거치면 된다.


1. mountd 서비스 포트 고정
/etc/services 에 mountd를 특정포트로 고정한다.
[링크 : http://mindwing.kr/141]

2. 공유기에서 포트 포워딩
rpcinfo -p 에서 나오는 portmapper 와 nfs 그리고 mountd 포트를 포워딩 해준다.
(111번 그리고 2049번 위에서 설정한 mountd 포트를 포워딩하면 된다)
$ rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  58095  status
    100024    1   tcp  49200  status
    100021    1   udp  44937  nlockmgr
    100021    3   udp  44937  nlockmgr
    100021    4   udp  44937  nlockmgr
    100021    1   tcp  50652  nlockmgr
    100021    3   tcp  50652  nlockmgr
    100021    4   tcp  50652  nlockmgr
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100005    1   udp  36811  mountd
    100005    1   tcp  33175  mountd
    100005    2   udp  36811  mountd
    100005    2   tcp  33175  mountd
    100005    3   udp  36811  mountd
    100005    3   tcp  33175  mountd

3. exports 설정
/etc/exports 에 nfs로 마운트할 아이피를 포함하여 작성한다.
  1 # /etc/exports: the access control list for filesystems which may be exported
  2 #               to NFS clients.  See exports(5).
  3 #
  4 # Example for NFSv2 and NFSv3:
  5 # /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
  6 #
  7 # Example for NFSv4:
  8 # /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
  9 # /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
 10 #
 11
 12 /home/samba/sharedDocs  123.123.123.123(rw,root_squash) 
추가적으로 /etc/hosts.allow /etc/hosts.deny도 하라지만 귀차니즘 -_-


원격지에서 mount시에는 아래와 같이 입력을 하면되며
만약 tcp로 고정하고 싶으면 -o tcp를 추가하면 된다.
# mount -t nfs -o tcp 111.111.111.111:/home/samba/sharedDocs mountpath

만약 123.123.123.123 아이피가 아닌 다른 컴퓨터에서 접속하면 다음과 같이 나온다.
# mount -t nfs 111.111.111.111:/home/samba/sharedDocs tt
mount: RPC: Unable to receive; errno = Connection refused

그나저나.. TCP로 접속해놔도 생각보다 랙이 심하네 공유기를 거쳐서인가?

2009/09/01 - [Linux/Ubuntu] - ubuntu nfs 서버 설치하기
2009/05/12 - [프로그램 사용/u-boot] - nfs를 udp가 아닌 tcp로 연결하도록 설정하기
2010/02/04 - [Linux/Ubuntu] - ubuntu에 NFS 서버 설치


Posted by 구차니
Word 2007의 기능인지 모르겠지만 이전 버전과 비교시 비교가 된다!
쫄지말고 Diff 눌러보자!




 

'프로그램 사용 > Version Control' 카테고리의 다른 글

rabbitVCS - 리눅스용 svn client  (0) 2011.10.15
git-svn 을 이용해서 svn 을 복제가능하다고?  (0) 2011.08.14
svn pam  (0) 2011.06.24
혼자서도 잘쓰는 tortoiseSVN  (0) 2011.06.20
SVN relocate / switch  (0) 2011.05.11
Posted by 구차니



ajxplorer를 쓰다보면 대충 30분 정도 지나면 자동으로 로그아웃 되는데..
솔찍히 이정도 시간이면 내부망이어도 1기가 겨우 올리는 정도라 대략 좌절을 하게 된다.
(올리다가 세션 종료되면 파일 올리던거 무효됨)

ajaxplorer의 conf.php에서
AJXP_CLIENT_TIMEOUT_TIME을 0으로 적어주거나

php.ini 에서
session.gc_maxlifetime 을 늘려주거나 하는 식으로 변경하면 될 듯
  
 ajaxplorer/server/conf/conf.php
268 /***********************************************/
269 /* CLIENT SESSION OPTIONS
270 /*********************************************/
271 // The length of the client session in SECONDS. By default, it's copying
272 // the server session length. In most PHP installation, it will be 1440, ie 24minutes.
273 // You can set this value to 0, this will make the client session "infinite" by
274 // pinging the server at regular occasions (thus keeping the PHP session alive).
275 // This is not a recommanded setting for evident security reasons.
276 //define("AJXP_CLIENT_TIMEOUT_TIME", intval(ini_get("session.gc_maxlifetime")));
277 define("AJXP_CLIENT_TIMEOUT_TIME", intval(ini_get("session.gc_maxlifetime")));
278 // The number of MINUTES before the session expiration
279 // where the client issues a warning.
280 define("AJXP_CLIENT_TIMEOUT_WARN_BEFORE", 3); 

 /etc/php5/apache2/php.ini
1500 ; After this number of seconds, stored data will be seen as 'garbage' and
1501 ; cleaned up by the garbage collection process.
1502 ; http://php.net/session.gc-maxlifetime
1503 session.gc_maxlifetime = 1440
1504
1505 ; NOTE: If you are using the subdirectory option for storing session files
1506 ;       (see session.save_path above), then garbage collection does *not*
1507 ;       happen automatically.  You will need to do your own garbage
1508 ;       collection through a shell script, cron entry, or some other method.
1509 ;       For example, the following script would is the equivalent of
1510 ;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
1511 ;          cd /path/to/sessions; find -cmin +24 | xargs rm
1512
1513 ; PHP 4.2 and less have an undocumented feature/bug that allows you to
1514 ; to initialize a session variable in the global scope, even when register_globals
1515 ; is disabled.  PHP 4.3 and later will warn you, if this feature is used.
1516 ; You can disable the feature and the warning separately. At this time,
1517 ; the warning is only displayed, if bug_compat_42 is enabled. This feature
1518 ; introduces some serious security problems if not handled correctly. It's
1519 ; recommended that you do not use this feature on production servers. But you
1520 ; should enable this on development servers and enable the warning as well. If you
1521 ; do not enable the feature on development servers, you won't be warned when it's
1522 ; used and debugging errors caused by this can be difficult to track down.
1523 ; Default Value: On
1524 ; Development Value: On
1525 ; Production Value: Off
1526 ; http://php.net/session.bug-compat-42 

[링크 : http://www.lge.co.kr//brand/nethard/support/NethardQnaDetailCmd.laf?brand=NETHARD]
Posted by 구차니


아래의 안전 모드 : 설정을 클릭하여 사용하지 않음으로 바꾸면 동영상을 볼 수 있다.
(19금이라던가 여러가지 sensorship 관련 제한을 필터링 해주는 옵션인듯)


[링크 : http://blog.naver.com/hahaj1/20109681239]
Posted by 구차니
현재 딱히 좋은 방법이 없어서
/etc/shadow에 직접 연결했는데 음..
생각해보니 DAV도 이용하고 적절하게 된듯?

Setup PAM for authentication

However, our SVN can be access by everyone, that is to say everyone can check out and commit, so we need to configure apache’s authentication for SVN. We plan to use PAM so that UNIX system user can access SVN use their username and password.

First enable auth_pam and auth_sys_group modules for apache2:

$ sudo a2enmod auth_pam
$ sudo a2enmod auth_sys_group

If we use shadow password in our system, we need to add www-data to the shadow group so that apache can read (not write!) the password of system user:

$ sudo adduser www-data shadow

Then edit our /etc/apache2/sites-available/ssl file and it should contain the following lines (the lines in red are newly added):

    DAV svn
    SVNPath /home/svn
 
    AuthType Basic
    AuthName “Subversion Repository”
    # this line is needed if your system use shadow password
    AuthUserFile /etc/shadow
    require group src

Restart the apache and everyone in the src group can access SVN repository.


[링크 : http://inming.net/?p=86]
 

Posted by 구차니
프로그램 사용/nfs2011. 6. 24. 21:47
Target 보드용 RootFS를 사용하기 위해 NFS를 사용하다 보니
확실히 NFS는 개발용으로는 좋으나 원격지에 대해서 물려쓰기에는 상당히 보안이 취약하다는 생각이 든다.
최소한 접속할 IP 대역을 제한해놓는다던가 하는 시스템적인 구현이 필요해 보인다.

sNFS와 같은 SSH를 통한 NFS등도 존재는 하지만
구조적인 보안취약성은 해결하기 힘들듯...

[링크 : http://www.sans.org/reading_room/whitepapers/linux/nfs-security-trusted-untrusted-environments_1956]
[링크 : http://www.lug.or.kr/docs/LINUX/others/00-01-5.htm]
[링크 : http://web.mit.edu/rhel-doc/4/RH-DOCS/rhel-sg-ko-4/s1-server-nfs.html]
[링크 : http://165.132.13.12/document/service_info/security/guide/document/unix/unix_nfs.html]
Posted by 구차니
프로그램 사용/VLC2011. 6. 23. 10:37
DMO 를 plugin 식으로 하는 것 외에는 별다른 방법이 없다고 한다.
(특정업체의 코덱을 설치해도 VLC에서는 외부 코덱을 끌어올수 없으므로 플레이 불가)

[링크 : http://forum.videolan.org/viewtopic.php?f=14&t=56789]
[링크 : http://forum.videolan.org/viewtopic.php?f=7&t=53304]


DMO는 Directx Media Object 의 약자인듯?
[링크 : http://telnet.or.kr/directx/htm/dmowrapperfilter.htm
Posted by 구차니
webcalendar의 경우 한글 출력에 문제가 있고 기본 버전에 포함된 한글 메시지들이 많이 부족하다 -_-
(조만간 번역할 듯한 기분이 들어....) 


아무튼 한글이 깨지는 문제는
▶ 월단위 달력에서 왼쪽의 "주차" 표시가 깨짐
인데, 이문제는 translation/Korean.txt 파일에서
 
charset: EUC-KR 
부분을

charset: UTF-8
로 바꾸고 파일 자체를 UTF-8로 저장을 해주면된다.

기본내장된 파일의 인코딩은 ANSI로 되어있고, 한글은 EUC-KR로 되어있어
UTF-8로 설정한 터미널에서 vi로 보면 글씨가 죄다 깨져보인다.



크롬의 경우 세션이 남아서 그런지, 열어놓은채로 파일을 변경하면 와장창 깨진다. -_- 
크롬이라면 종료후 다시 실행해서 페이지를 열어보면 정상대로 출력된다. 

번역중 (1.2.3 버전)

 

'프로그램 사용 > Webcalendar' 카테고리의 다른 글

webcalendar  (0) 2011.04.06
open source web calendar / scheduler  (0) 2011.01.04
Posted by 구차니
프로그램 사용/Putty2011. 6. 21. 09:06
맨날 헷갈리는데.. 이넘의 Local / Remote 개념이란 -_-

아무튼, 아래와 같이 putty에서 Local 로 설정을 하고
Local의 5900번 포트를 localhost의 5900번(여기서 localhost는 putty가 실행한 pc)
그리고 Add를 누르면 게임끝~!


vnc에서는 이제 귀차니즘 100% 발동하여 localhost만 쳐주면 된다.


Posted by 구차니
tortoiseSVN은 원래 Client 프로그램이지만
File system 레벨로 구성하면 로컬 하드에 저장소를 구축하여 사용할 수 있다.
(물론 이 경우 사용자 이름으로 윈도우 로그인 이름이 저장된다)

Step 1. 일단 귀찮으니 D 드라이브의 루트에 repos 라는 폴더 생성!


Step 2. repos 폴더를 선택해서 "TortoiseSVN -> Create repository here"를 실행한다.

 
Step 3. 머 생성되었다는 간단한 메시지

 
Step 4. 심심하니 한번 구경을 해보려면 바탕화면이나 탐색기의 빈공간에서 "TortoiseSVN -> Repo-browser"를 실행

 
Step 5. file:/// (/이 세번 들어감!) d:/ 이런식으로 리눅스 스타일로 적어줌

 
Step 6. 아직 넣은게 없으니 깨끗한 저장소

 
Step 7. 정식대로 쓰려면 빈공간에서 "SVN Checkout"을 실행하고

 
Step 8. URL에 아까 repo-browser에서 사용했던 것처럼 file:///d:/repos 를 입력한다.

 

Step 9. 아직 파일은 없으니 단순하게 check out만 하고 폴더가 생긴다.



그 이후에는 이 폴더 안에 파일을 넣고
TortoiseSVN 메뉴에서 Add를 하거나 Delete를 하거나 Rename 등의 작업을 하고


저장소에 정식으로 올려넣으려면 Commit을 하면된다. 

 

'프로그램 사용 > Version Control' 카테고리의 다른 글

TortoiseSVN doc 비교  (0) 2011.07.29
svn pam  (0) 2011.06.24
SVN relocate / switch  (0) 2011.05.11
svnadmin dump / load를 이용한 저장소 합치기  (2) 2011.05.09
SVN 저장소 합치기 - merging SVN repositories  (0) 2011.01.08
Posted by 구차니