6.3. Libreswan 설치

Libreswan IPsec/IKE 구현을 통해 VPN을 설정하려면 해당 패키지를 설치하고 ipsec 서비스를 시작하고 방화벽에서 서비스를 허용해야 합니다.

사전 요구 사항

  • AppStream 리포지토리가 활성화되어 있어야 합니다.

절차

  1. libreswan 패키지를 설치합니다.

    # dnf install libreswan
  2. Libreswan을 다시 설치하는 경우 이전 데이터베이스 파일을 제거하고 새 데이터베이스를 만듭니다.

    # systemctl stop ipsec
    # rm /var/lib/ipsec/nss/*db
    # ipsec initnss
  3. ipsec 서비스를 시작하고 부팅 시 서비스를 자동으로 시작합니다.

    # systemctl enable ipsec --now
  4. ipsec 서비스를 추가하여 IKE, ESP 및 AH 프로토콜에 500 및 4500/UDP 포트를 허용하도록 방화벽을 구성합니다.

    # firewall-cmd --add-service="ipsec"
    # firewall-cmd --runtime-to-permanent