strongswan 을 이용하여 IPSec 설정중 도움 요청

dn2enf2의 이미지

안녕하세요
StrongS/Wan 이용해서 IPSec 환경을 구축하려고 하는데 잘 안되네요

환경
A 네트웤이 111.111.111.111 이고 B 네트웍이 222.222.222.222 이며
B의 방화벽에서 Dynamic nat 로 사설 IP 22.22.22.22 에 연결

B 에서 21.21.21.21 와 22.22.22.22 라는 두대 사이에서는 연결이 무난히 해결 되었는데
A 와 B 사이에는 연결은 성립이 되고 ping 에 대한 request/response 가 esp 로 표시됩니다.
application 으로 tcp port 를 열고 telnet 으로 연결 했을 경우는
22.22.22.22 로 트래픽이 들어오는건 확인 되는데 application으로 전달이 되질 않습니다.

이유가 뭔지 모르겠는데 경험 있으신 분들의 조언 구합니다.

ipsec.conf 설정
config setup
plutodebug="control crypt"
strictcrlpolicy=no
charonstart=no

conn %default
keyexchange=ikev1
ikelifetime=60m
keylife=20m
keyingtries=%forever
rekeymargin=10m
rekey=no
left=111.111.111.111 // b side: left=22.22.22.22
leftfirewall=no
leftcert=leftcert.pem
ike=3des-sha1-modp1024!
esp=3des-sha1
leftrsasigkey=%cert
rightrsasigkey=%cert
authby=rsasig
compress=yes
pfs=yes

conn host-host
right=222.222.222.222 // b side: right=111.111.111.111
rightid="asdf@asdf.com"
type=transport
auto=add
auth=esp

vecter의 이미지

저는 openswan 을 이용했구요
ipsec.conf 랑 iptable 적어 드립니다.


192.168.202.0/24 openwsan ADSL(유동ip) <----인터넷----> 61.252.15x.194/32 vpn장비 61.252.15x.128/26

# /etc/ipsec.conf - Openswan IPsec configuration file
# RCSID $Id: ipsec.conf.in,v 1.15.2.4 2006/07/11 16:17:53 paul Exp $

# This file: /usr/share/doc/openswan/ipsec.conf-sample
#
# Manual: ipsec.conf.5

version 2.0 # conforms to second version of ipsec.conf specification

# basic configuration
config setup
# plutodebug / klipsdebug = "all", "none" or a combation from below:
# "raw crypt parsing emitting control klips pfkey natt x509 private"
# eg:
plutodebug="none"
#
# Only enable klipsdebug=all if you are a developer
#
# NAT-TRAVERSAL support, see README.NAT-Traversal
nat_traversal=yes
# virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
#
# enable this if you see "failed to find any available worker"
nhelpers=0

# Add connections here
conn work
type=tunnel
authby=secret
keyexchange=ike
pfsgroup=modp1024
ike=3des-sha1-modp1024
esp=3des-sha1
ikelifetime=60m
keylife=60m
left=%defaultroute
leftsubnet=192.168.202.0/24
right=ktvpn.gotdns.com
rightsubnet=61.252.15x.128/26
dpddelay=60
dpdtimeout=120
dpdaction=clear
auto=start

root@repeater:~# cat /etc/firewall.user
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
iptables -A input_rule -p esp -s 0/0 -j ACCEPT
iptables -A input_rule -p udp -s 0/0 --dport 500 -j ACCEPT
iptables -A input_rule -p udp -s 0/0 --dport 4500 -j ACCEPT
iptables -t nat -A postrouting_rule -d 61.252.158.128/26 -j ACCEPT
iptables -A forwarding_rule -d 61.252.15x.128/26 -j ACCEPT
#iptables -A forwarding_rule -d 192.168.202.0/24 -j ACCEPT

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.