2007년 02월 06일
NFS firewall 세팅
방화벽 뒤에 NFS가 있을때 세팅 방법입니다.
NFS를 건성으로 봤는데 상당히 유용하네요.
1. 아래 내용으로 파일 생성 "/etc/sysconfig/nfs"
STATD_PORT=4001
LOCKD_TCPPORT=4002
LOCKD_UDPPORT=4002
MOUNTD_PORT=4003
2. "/etc/services" 수정
rquotad 4004/tcp # rpc.rquotad tcp port
rquotad 4004/udp # rpc.rquotad udp port
3. nfs 재구동
/etc/init.d/nfs restart
/etc/init.d/nfslock restart
4. 포트정보 확인 /usr/sbin/rpcinfo -p
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
100021 1 udp 4002 nlockmgr
100021 3 udp 4002 nlockmgr
100021 4 udp 4002 nlockmgr
100021 1 tcp 4002 nlockmgr
100021 3 tcp 4002 nlockmgr
100021 4 tcp 4002 nlockmgr
100005 1 udp 4003 mountd
100005 1 tcp 4003 mountd
100005 2 udp 4003 mountd
100005 2 tcp 4003 mountd
100005 3 udp 4003 mountd
100005 3 tcp 4003 mountd
100024 1 udp 4000 status
100024 1 tcp 4000 status
5. iptables에서 포트 열기
4000~4004번까지 tcp,udp 다 열면 간단합니다.
111:tcp, 111:udp -> portmapper
2049:tcp, 2049:udp -> nfs
4001:tcp, 4001:udp
4002:tcp, 4002:udp,
4003:tcp, 4003:udp,
4004:tcp, 4004:udp
6. 마운트
mount -t nfs nfs서버ip:/export 디렉터리 /로컬마운트 디렉터리
예) mount -t nfs 192.168.100.100:/data_share /data
NFS를 건성으로 봤는데 상당히 유용하네요.
1. 아래 내용으로 파일 생성 "/etc/sysconfig/nfs"
STATD_PORT=4001
LOCKD_TCPPORT=4002
LOCKD_UDPPORT=4002
MOUNTD_PORT=4003
2. "/etc/services" 수정
rquotad 4004/tcp # rpc.rquotad tcp port
rquotad 4004/udp # rpc.rquotad udp port
3. nfs 재구동
/etc/init.d/nfs restart
/etc/init.d/nfslock restart
4. 포트정보 확인 /usr/sbin/rpcinfo -p
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
100021 1 udp 4002 nlockmgr
100021 3 udp 4002 nlockmgr
100021 4 udp 4002 nlockmgr
100021 1 tcp 4002 nlockmgr
100021 3 tcp 4002 nlockmgr
100021 4 tcp 4002 nlockmgr
100005 1 udp 4003 mountd
100005 1 tcp 4003 mountd
100005 2 udp 4003 mountd
100005 2 tcp 4003 mountd
100005 3 udp 4003 mountd
100005 3 tcp 4003 mountd
100024 1 udp 4000 status
100024 1 tcp 4000 status
5. iptables에서 포트 열기
4000~4004번까지 tcp,udp 다 열면 간단합니다.
111:tcp, 111:udp -> portmapper
2049:tcp, 2049:udp -> nfs
4001:tcp, 4001:udp
4002:tcp, 4002:udp,
4003:tcp, 4003:udp,
4004:tcp, 4004:udp
6. 마운트
mount -t nfs nfs서버ip:/export 디렉터리 /로컬마운트 디렉터리
예) mount -t nfs 192.168.100.100:/data_share /data
# by | 2007/02/06 09:27 | 리눅스강좌 | 트랙백 | 덧글(1)




☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]