홍석범님 보안서적 Openvpn 구축 관련
작성자 정보
- 최광민 작성
- 작성일
컨텐츠 정보
- 5,563 조회
- 0 추천
- 목록
본문
안녕하세요.
다름이 아니라 홍석범님 리눅스 실무 보안 서적에 소개되어있는 openvpn으로 VPN 서버를 구축하여 VPN 서버내에 Samba를 통하여 파일 서버를 구축후 원격지의 WindowsXP 클라이언트가 VPN 연결후 바로 네트워크 드라이브 연결을 통해 Samba 파일서버에 접근하고자 구성중입니다.
책자 내용과 sulinux.net에 소개되어있는 openvpn 설치 성공기를 참조하여 openvpn을 설치하고 인증서등을 생성하는데는 성공하였습니다.
근데 정작 openvpn을 실행하고자 하면 다음과 같은 log와 함께 전혀 데몬 프로세스나 포트가 리슨하지 못하고 있습니다.
Options error: --server directive network/netmask combination is invalid
Use --help for more information.
다음은 netstat 정보입니다.
[root@ openvpn]# netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :::22 :::* LISTEN 2505/sshd
udp 0 0 0.0.0.0:13 0.0.0.0:* 2535/xinetd
udp 0 0 0.0.0.0:37 0.0.0.0:* 2535/xinetd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 5438 2561/dbus-daemon-1 /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 8304 3779/0 /tmp/ssh-zEdwVM3779/agent.3779
[root@ openvpn]#
다음은 ifconfig 정보입니다.
[root@ openvpn]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:06:5B:3E:69:C4
inet addr:220.95.214.33 Bcast:220.95.214.255 Mask:255.255.255.0
inet6 addr: fe80::206:5bff:fe3e:69c4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15681 errors:0 dropped:0 overruns:0 frame:0
TX packets:1782 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1186480 (1.1 MiB) TX bytes:264102 (257.9 KiB)
Interrupt:217
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3456 (3.3 KiB) TX bytes:3456 (3.3 KiB)
다음은 iptables 정보입니다.
[root@ openvpn]# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 10.1.0.0/24 anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@ openvpn]#
OS Version SULINUX 1.5 Version 입니다.
다음 openvpn.conf에 활성화 되어있는 config는 다음과 같습니다.
port 1194
proto udp
dev tap0
ca ca.crt
cert server.crt
dh dh1024.pem
server 10.1.0.1 255.255.255.0
#ifconfig 10.1.0.1 255.255.255.0
ifconfig-pool-persist ipp.txt
client-to-client
duplicate-cn
keepalive 10 60
comp-lzo
max-clients 20
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
log-append openvpn.log
verb 4
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so login
다음은 VPN 설치 서버의 openvpn version 정보입니다.
[root@benice-web openvpn]# rpm -qi openvpn
Name : openvpn Relocations: (not relocatable)
Version : 2.0.7 Vendor: James Yonan <jim@yonan.net>
Release : 1 Build Date: 2007년 03월 29일 (목) 오후 06시 46분 25초
Install Date: 2007년 03월 29일 (목) 오후 06시 46분 39초 Build Host: benice-web
Group : Applications/Internet Source RPM: openvpn-2.0.7-1.src.rpm
Size : 731745 License: GPL
Signature : (none)
Packager : James Yonan <jim@yonan.net>
URL : http://openvpn.net/
Summary : OpenVPN is a robust and highly flexible VPN daemon by James Yonan.
Description :
OpenVPN is a robust and highly flexible VPN daemon by James Yonan.
OpenVPN supports SSL/TLS security,
ethernet bridging,
TCP or UDP tunnel transport through proxies or NAT,
support for dynamic IP addresses and DHCP,
scalability to hundreds or thousands of users,
and portability to most major OS platforms.
다음은 openssl 정보입니다.
[root@benice-web openvpn]# rpm -qi openssl
Name : openssl Relocations: (not relocatable)
Version : 0.9.7a Vendor: CentOS
Release : 43.14 Build Date: 2006년 09월 30일 (토) 오전 12시 06분 15초
Install Date: 2007년 03월 29일 (목) 오후 06시 25분 43초 Build Host: x8664-build.centos.org
Group : System Environment/Libraries Source RPM: openssl-0.9.7a-43.14.src.rpm
Size : 2568755 License: BSDish
Signature : DSA/SHA1, 2006년 09월 30일 (토) 오전 01시 14분 23초, Key ID a53d0bab443e1821
Packager : Johnny Hughes <johnny@centos.org>
URL : http://www.openssl.org/
Summary : The OpenSSL toolkit.
Description :
The OpenSSL toolkit provides support for secure communications between
machines. OpenSSL includes a certificate management tool and shared
libraries which provide various cryptographic algorithms and
protocols.
[root@benice-web openvpn]#
다음은 lzo 정보입니다.
[root@benice-web openvpn]# rpm -qi lzo
Name : lzo Relocations: (not relocatable)
Version : 1.08 Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
Release : 4.2.el4.rf Build Date: 2005년 02월 18일 (금) 오전 06시 30분 17초
Install Date: 2007년 03월 29일 (목) 오후 06시 11분 03초 Build Host: lisse.leuven.wieers.com
Group : System Environment/Libraries Source RPM: lzo-1.08-4.2.el4.rf.src.rpm
Size : 168556 License: GPL
Signature : DSA/SHA1, 2005년 02월 18일 (금) 오전 11시 24분 16초, Key ID a20e52146b8d79e6
Packager : Dag Wieers <dag@wieers.com>
URL : http://www.oberhumer.com/opensource/lzo/
Summary : Portable lossless data compression library
Description :
LZO is a portable lossless data compression library written in ANSI C.
It offers pretty fast compression and *very* fast decompression.
Decompression requires no memory. In addition there are slower
compression levels achieving a quite competitive compression ratio
while still decompressing at this very high speed.
[root@benice-web openvpn]#
다음은 서버에 생성된 인증키들의 모습입니다.
/etc/openvpn
-rw-r--r-- 1 root root 1253 3월 29 19:29 ca.crt
-rw------- 1 root root 887 3월 29 19:29 ca.key
-rw-r--r-- 1 root root 245 3월 29 19:29 dh1024.pem
lrwxrwxrwx 1 root root 11 3월 29 19:55 openvpn.conf -> server.conf
-rw------- 1 root root 106 3월 29 20:50 openvpn.log
-rw-r--r-- 1 root root 10059 3월 29 20:36 server.conf
-rw-r--r-- 1 root root 3649 3월 29 19:29 server.crt
-rw-r--r-- 1 root root 761 3월 29 19:29 server.csr
-rw------- 1 root root 887 3월 29 19:29 server.key
마지막으로 tun 이나 tap 에 대하여 ipalias 등이나 /etc/sysconfig/network-scripts/ifcfg-tun 등으로 따로 생성을 해줘야 하는건지 아니면 openvpn의 실행과 함께 자동으로 네트워크 디바이스에 대한 정보가 새로 생성된느건지 궁금합니다.
몇일째 삽질중인데.. 대체 파악이 않되니 답답합니다
아무쪼록 도움을 주셨으면 너무나 감사하겠습니다.
관련자료
-
이전
-
다음