작성
·
597
0
[root@ip-10-4-1-112 log]# service ipsec status
Redirecting to /bin/systemctl status ipsec.service
● ipsec.service - Internet Key Exchange (IKE) Protocol Daemon for IPsec
Loaded: loaded (/usr/lib/systemd/system/ipsec.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2022-07-31 06:39:52 UTC; 2s ago
Docs: man:ipsec(8)
man:pluto(8)
man:ipsec.conf(5)
Process: 7837 ExecStopPost=/usr/sbin/ipsec --stopnflog (code=exited, status=0/SUCCESS)
Process: 7834 ExecStopPost=/sbin/ip xfrm state flush (code=exited, status=0/SUCCESS)
Process: 7832 ExecStopPost=/sbin/ip xfrm policy flush (code=exited, status=0/SUCCESS)
Process: 7830 ExecStop=/usr/libexec/ipsec/whack --shutdown (code=exited, status=0/SUCCESS)
Process: 8092 ExecStartPre=/usr/sbin/ipsec --checknflog (code=exited, status=0/SUCCESS)
Process: 8089 ExecStartPre=/usr/sbin/ipsec --checknss (code=exited, status=0/SUCCESS)
Process: 7849 ExecStartPre=/usr/libexec/ipsec/_stackmanager start (code=exited, status=0/SUCCESS)
Process: 7845 ExecStartPre=/usr/libexec/ipsec/addconn --config /etc/ipsec.conf --checkconfig (code=exited, status=0/SUCCESS)
Main PID: 8105 (pluto)
Status: "Startup completed."
CGroup: /system.slice/ipsec.service
└─8105 /usr/libexec/ipsec/pluto --leak-detective --config /etc/ipsec.conf --nofork
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: adding interface lo/lo ::1:500
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: | setup callback for interface lo:500 fd 19
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: | setup callback for interface lo:4500 fd 18
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: | setup callback for interface lo:500 fd 17
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: | setup callback for interface eth0:4500 fd 16
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: | setup callback for interface eth0:500 fd 15
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: loading secrets from "/etc/ipsec.secrets"
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: loading secrets from "/etc/ipsec.d/aws.secrets"
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: initiating all conns with alias='Tunnel1'
Jul 31 06:39:52 ip-10-4-1-112.ap-northeast-1.compute.internal pluto[8105]: initiating all conns with alias='Tunnel2'
답변 1
0
문제가 해결되어 공유드립니다.
/etc/ipsec.conf에서 pluto 디버그 모드를 실행하고 /var/log/openswan.log를 확인하니 아래와 같은 로그가 있었습니다.
Error: Failed to add connection "Tunnel1", esp="aes128-sha1;modp1024" is invalid: ESP encryption algorithm 'aes' is not supported.
위 로그를 검색해보니 유사한 사례가 있어서서 /etc/ipsec.d/aws.conf 의 phase2alg를 아래와 같이 수정하니 정상적으로 터널이 연결 되었습니다.
phase2alg=aes_gcm
안녕하세요 안데스라마님,
동일한 방법으로 phase2alg를 수정하여 문제를 해결하였는데, 해결 방법을 먼저 공유해주셔서 대단히 감사드립니다. :)
aws와 openswan이 업데이트 되는 과정에서 발생한 문제로 추측되는데 자세한 내용을 찾게 되면 이 답변에 이어서 공유드리겠습니다.