반응형
테스트한 날짜: 2024년 2월 20일
잠깐 !!
PPTP Server 구축하기 전에 PPTP Client 설정 및 터널 생성하는 법을 알고 싶다면 아래 문서를 참고 !
https://andrewpage.tistory.com/257
PPTP 패키지 설치
$ sudo apt install pptpd
PPTP 서버 설정
## ## Tunnel Interface에 할당할 IP address를 설정한다. ## 예를 들어, PPTP server는 ppp0 tunnel interface에 10.1.0.1 주소를 할당. ## PPTP client는 ppp0 tunnel interface에 10.1.0.100 주소를 할당. ## $ cat /etc/pptpd.conf ... 중간 생략 ... localip 10.1.0.1 remoteip 10.1.0.100-130 ... 중간 생략 ... ## ## PPTP client에 접속 요청할 때, PPTP server가 아래의 network 구성 정보를 client에게 전달하도록 함. ## mtu 값은 실제 physical NIC의 mtu 값보다 대략 60~100 bytes 정도 작게 설정해야 ## tunnel session을 통해서 IP 패킷이 전송될 때, IP 패킷의 꼬리 부분이 짤리는 현상이 없다. ## 예를 들어서, physical NIC의 MTU 값이 1500 이라고 가정해보면 ## PPTP tunnel interface의 MTU는 1400 정도 되어야 IP packet이 버려지지 않고 전송된다. ## 만약 실수로 tunnel mtu를 1500으로 설정하면, 1500 byte 짜리 IP packet이 전송되려 할 것이고 ## 이 때 IP packet의 뒷 부분 60~100 bytes 정도가 짤리는 현상이 발생할 것이다. ## $ cat /etc/ppp/pptpd-options ... 중간 생략 ... ms-dns 1.1.1.1 mtu 1400 mru 1400 default-asyncmap ... 중간 생략 ... ## ## 반드시 ip_forward를 enable 시켜야 한다. ## ip_forward 설정이 enable 되어야 한개의 Linux OS내부에서 Physical port 'ens3'와 ppp0 간에 패킷이 forward된다. ## $ sudo sysctl -w net.ipv4.ip_forward=1 $ cat /etc/sysctl.conf ... 중간 생략 ... net.ipv4.ip_forward=1 ... 중간 생략 ... $
PPTP 계정 설정
PPTP client가 PPTP server에 접속할 때 사용할 Account 정보를 설정한다.
$ cat /etc/ppp/chap-secrets # client server secret IP addresses mynewid pptpd my!pass@word * gildong pptpd me!hahahoho@ *
PPTP 서비스 기동
$ systemctl start pptpd $ systemctl enable pptpd $ systemctl status pptpd ● pptpd.service - PoPToP Point to Point Tunneling Server Loaded: loaded (/lib/systemd/system/pptpd.service; disabled; vendor preset: enabled) Active: active (running) since Tue 2024-02-20 22:35:17 KST; 34min ago ... 중간 생략 ...
PPTP Client를 이용하여 PPTP 터널 생성 테스트하기
Ubuntu OS에서 PPTP Client를 설정하는 방법은 아래 문서를 참고 !
https://andrewpage.tistory.com/257
'Network' 카테고리의 다른 글
웹 브라우저의 TLS, HTTPS 암호화 패킷을 Wireshark으로 복호화하기 (0) | 2024.06.04 |
---|---|
[Study] High-speed packet capture, filtering - PF_RING, ZC(Zero Copy) (0) | 2024.04.02 |
ip link 명령으로 macvlan network interface 만들기 (0) | 2024.02.09 |
WireGuard로 나만의 커스텀 VPN 서버 구축(일명, Bespoke VPN Server) (0) | 2024.01.08 |
SSH Port forwarding (SSH Tunneling) 구성 예제 및 실습 (0) | 2023.12.22 |