Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Site-to-Site with strongSwan x.509 cert issue

I'm trying to connect my ASG320 to a linux box running strongSWAN.  

In the cert manager I have created a cert named 20thstreet and setup the gateway/vpn deffinitions on my ASG320 using the IP of the remote strongSWAN box as the identifier. 

On my debian/strongSWAN box i have installed strongSWAN/openssl.  I imported the Astaro CA and running ipsec rereadall verifies that it's installed correctly.

 "gateway:/etc/ipsec.d/certs# ipsec listcacerts
000
000 List of X.509 CA Certificates:
000
000 Mar 09 14:21:03 2009, count: 1
000        subject:  and so on ................. "

On the ASG320 I exported the 20thstreet cert and put the pem file in /etc/ipsec.d/certs.   When I run ipsec rereadall I get
 "/etc/ipsec.secrets" line 10: syntax error in PKCS#1 private key file

I think i missed something but am not sure what.  Any input would be greatly appreciated.


This thread was automatically locked due to age.
  • If MASQUERADING is activated on your debian box then you must exempt traffic to be tunnelled from NAT by inserting the following iptables rule in the POSTROUTING chain:

    iptables -t nat -I POSTROUTING 1 -s 192.168.5.0/24 -o eth1 -m policy --dir out --pol ipsec --proto esp -j ACCEPT

    Andreas
  • I don't have MASQ enabled(yet), but thanks for the tip as I'm sure it will come in handy soon.  Maybe I'm missing kernel mods as I'm running 2.6.18 ?  I'll search around more and see what comes up.
    #####################################################
    bellRd-gateway:~# iptables --list
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination

    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    ACCEPT     0    --  192.168.0.0/24       192.168.5.0/24      policy match dir in pol ipsec reqid 16385 proto esp
    ACCEPT     0    --  192.168.5.0/24       192.168.0.0/24      policy match dir out pol ipsec reqid 16385 proto esp

    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    #####################################################
    So on my debian box I shouldn't necessarily have an "ipsec" interface, just on the astaro?

    Thanks again,
    Sean
  • Updated to 2.6.24 now running "strongSwan version U2.8.0/K2.6.24-etchnhalf.1-686".

    No changes.....
  • I did some reading and ipsec devices are no more in > 2.6.16, or so that's what I gathered.  Bringing up the packet filter on the astaro shows that they are coming in but over the regular interface, not the ipsec channel, again or so I think.

    A ping from behind my debian gateway yeilds this on the astaro packet filter log
    Default DROP  ICMP 
    63.253.165.73      
    → 
    192.168.0.200      

    len=84  ttl=63  tos=0x00  srcmac=00:02:a5:f0:23:0a  dstmac=00:1a:8c:17:22:49

    Trying to ssh to a machine behind my astaroFW from a computer behind my debian gateway yeilds this in the astaro packet filter log

    Default DROP  TCP 
    63.253.165.73  :  32931
    → 
    192.168.0.122  :  22

    [SYN]  len=60  ttl=63  tos=0x00  srcmac=00:02:a5:f0:23:0a  dstmac=00:1a:8c:17:22:49

    This leads me to believe I am missing a ipsec.conf directive that modifies IPtables automatically?
  • "With pluto reaching the rightsubnet via the tunnel from the gateway
    itself is not possible because the IPsec policy is for leftsubnet
    but the source address will be left. Thus ESP encapsulation will be
    done and since there is not route to rightsubnet, the icmp request
    will not leave the gateway.
    "

    Solved!  I will post a link to a writeup in the near future.  Thanks again!
  • Since you were talking about leftid, how does one set that for the Astaro? The web GUI does not seem to allow it.
  • I remember this thread!   Andreas is one of the developers of StrongSwan, but he hasn't been back to these forums since the post above almost three years ago.  support@ has only been back twice since then, so I think he only posts when he has an issue.

    I think it's like I said in the other thread - you can't set it in WebAdmin, but that would make a good Feature Suggestion.

    Cheers - Bob