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

site2site VPN and remote access stopped

I am running 8.300.  Today I noticed that my site 2 site VPN and my L2TP (iphone) remote access stopped working for my local astaro.

All I could find strange in the logs for my local machine was packet filter dropping packets from my remote site2site VPN machine.

2012:01:09-00:00:18 brk ulogd[5543]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60001" initf="eth1" srcmac="0:1d:a2:xx:xx:xx" dstmac="0:11:a:xx:xx:xx" srcip="70.123.XX.XX" dstip="72.183.XX.XX" proto="6" length="64" tos="0x00" prec="0x00" ttl="55" srcport="62942" dstport="36804" tcpflags="SYN" 

To test the packet filter, I added a rule to allow all traffic from the remote machine.  remote_ip -> any -> any.

After this, the packets were still dropping.

Not sure where else to look, I rebooted the machine.

When it came back up, I found the site to site tunnel was up and all was working fine.

Suggestions?


This thread was automatically locked due to age.
  • Well - I did manage to recreate the problem after recalling that I was messing with the interfaces late last week.

    If I disable the interface on my local machine that VPN is bound to, it stops working (no surprise here!).  When I re-enable the interface, the VPN tunnel does not restart and the remote L2TP over IPSEC clients no longer work either.

    Rebooting the astaro with the interface enabled and then it works.

    Background -
      - I have two external interfaces (one cable, one dsl)
      - Uplink balancing enabled w/ multipath rules to route certain traffic out of specific interfaces, allowing failover.
      - site 2 site and remote access are both setup on the cable modem interface.
      - toggling the cable modem interface off and then back on causes the symptoms.

    I assume this is an error and the VPN should work again once the interface is back up?

    Thanks!
  • Could you check whether the configuration file is rewritten after the cable link goes down? Please post the output of these commands:

    cat /var/sec/chroot-ipsec/etc/ipsec.conf
    
    ipsec status
  • when the interface is disabled, the ipsec.conf file above doesn't exist.  When the interface is re-enabled the ipsec.conf file comes back and matches what it was before.  However, the site2site VPN doesn't reconnect.

    If I disable/re-enable the site2site vpn, then the vpn comes back online without rebooting.  I also find I can connect with the iphone at this point.

    Additional observation - when I disable the interface in the interface tab, the dashboard still says [Up] [Up].  I can confirm the network stopped functioning because my computer external ip address changes (per whatismyip.com website) due to multipath rules.  Re-enable interface and dashboard stays [Up] [Up] and my external ip address changes back.  ipsec doesn't function.  I then tried pulling the network plug.  The interface went to [Up] [Down].  Reconnecting the ethernet, the interface went to [Up] [Up] but ipsec still did not work.

    When ipsec is functioning... if I pull the ethernet cable the tunnel drops.  When I plug it back in it reconnects.


    Here is the output of ipsec status after cycling the enable button on the interface.

    brk:/tmp # ipsec status
    000 "S_REF_gqSeDxincK_0": 72.183.***.***[72.183.***.***]:17/1701...%any[%any]:17/%any==={0.0.0.0/0}; unrouted; eroute owner: #0
    000 "S_REF_gqSeDxincK_0":   newest ISAKMP SA: #0; newest IPsec SA: #0;
    000 "S_REF_gqSeDxincK_1": 72.183.***.***[72.183.***.***]:17/0...%any[%any]:17/%any==={0.0.0.0/0}; unrouted; eroute owner: #0
    000 "S_REF_gqSeDxincK_1":   newest ISAKMP SA: #0; newest IPsec SA: #0;
    000 "S_REF_VOhyqLanfF_0": 209.208.***.***/24===72.183.***.***[72.183.***.***]...70.123.***.XX[70.123.***.XX]===192.168.5.0/24; unrouted; eroute owner: #0
    000 "S_REF_VOhyqLanfF_0":   newest ISAKMP SA: #0; newest IPsec SA: #0;
    000 "S_REF_VOhyqLanfF_1": 192.168.1.0/24===72.183.***.***[72.183.***.***]...70.123.***.XX[70.123.***.***]===192.168.5.0/24; unrouted; eroute owner: #0
    000 "S_REF_VOhyqLanfF_1":   newest ISAKMP SA: #0; newest IPsec SA: #0;
  • I also found that I can disable/re-enable the remote access L2TP over IPSEC and then both remote access and site2site function again without requiring a reboot.
  • When you re-enable the interface and the ipsec.conf is in place, is pluto running?
    pidof pluto
     should put out the process id
  • # Before
    brk:/root # pidof pluto
    28917

    # Interface disabled in interface tab
    brk:/root # pidof pluto

    # Interface re-enabled in interface tab
    brk:/root # pidof pluto
    1779
  • Then, what does the IPsec log say after the interface is reenabled?
  • Digging into what I was seeing earlier - the dropped packets in the firewall log.  Does this make any sense?

    # Before - all working
    iptables --list-rules > iptables.log.ipsec_working

    # Disable the interface in the interface tab
    iptables --list-rules > iptables.log.ipsec_off

    # Re-enable the interface tab
    iptables --list-rules > iptables.log.ipsec_dead


    Now - compare the results

    brk:/tmp # diff iptables.log.ipsec_working iptables.log.ipsec_interface_off  | sed 's/70.123\..*\.*\//70.123.***.***\//g;s/72.183\..*\.*\//72.183.yyy.yyy\//g;s/172\..*\..*\.*\//172.zzz.zzz.0\//g'
    
    64,65d63


    And I see no change from interface being off to being back on...

    brk:/tmp # diff iptables.log.ipsec_interface_off iptables.log.ipsec_dead  | sed 's/70.123\..*\.*\//70.123.***.***\//g;s/72.183\..*\.*\//72.183.yyy.yyy\//g;s/172\..*\..*\.*\//172.zzz.zzz.0\//g'
    
    brk:/tmp #
  • Yeah, that's pretty much all IPsec related packetfilter rules missing. And nothing in ipsec.log about this? There should be some messages when pluto is trying to send out IKE packets.
  • # Shutting down



    2012:01:10-12:03:08 brk openl2tpd[7276]: Exiting
    2012:01:10-12:03:08 brk openl2tpd[7276]: Cleaning up before exiting
    2012:01:10-12:03:08 brk openl2tpd[7276]: Unloading plugin /usr/lib/openl2tp/ppp_unix.so
    2012:01:10-12:03:08 brk pluto[7328]: shutting down
    2012:01:10-12:03:08 brk pluto[7328]: forgetting secrets
    2012:01:10-12:03:08 brk pluto[7328]: "S_REF_VOhyqLanfF_1": deleting connection
    2012:01:10-12:03:08 brk pluto[7328]: "S_REF_VOhyqLanfF_1" #3: deleting state (STATE_QUICK_I2)
    2012:01:10-12:03:08 brk pluto[7328]: ERROR: "S_REF_VOhyqLanfF_1" #3: sendto on eth1 to 70.123.***.***:500 failed in delete notify. Errno 22: Invalid argument
    2012:01:10-12:03:08 brk pluto[7328]: "S_REF_VOhyqLanfF_0" #6: deleting state (STATE_QUICK_R2)
    2012:01:10-12:03:08 brk pluto[7328]: ERROR: "S_REF_VOhyqLanfF_0" #6: sendto on eth1 to 70.123.***.***:500 failed in delete notify. Errno 22: Invalid argument
    2012:01:10-12:03:08 brk pluto[7328]: "S_REF_VOhyqLanfF_1" #5: deleting state (STATE_QUICK_R2)
    2012:01:10-12:03:08 brk pluto[7328]: ERROR: "S_REF_VOhyqLanfF_1" #5: sendto on eth1 to 70.123.***.***:500 failed in delete notify. Errno 22: Invalid argument
    2012:01:10-12:03:09 brk pluto[7328]: "S_REF_VOhyqLanfF_0" #1: deleting state (STATE_MAIN_I4)
    2012:01:10-12:03:09 brk pluto[7328]: ERROR: "S_REF_VOhyqLanfF_0" #1: sendto on eth1 to 70.123.***.***:500 failed in delete notify. Errno 22: Invalid argument
    2012:01:10-12:03:09 brk pluto[7328]: "S_REF_VOhyqLanfF_1" #2: deleting state (STATE_MAIN_R3)
    2012:01:10-12:03:09 brk pluto[7328]: ERROR: "S_REF_VOhyqLanfF_1" #2: sendto on eth1 to 70.123.***.***:500 failed in delete notify. Errno 22: Invalid argument
    2012:01:10-12:03:09 brk pluto[7328]: updown: /sbin/ip -4 route del 192.168.5.0/24 dev eth1 src 192.168.1.1 proto ipsec metric 0 failed with status 2:
    2012:01:10-12:03:09 brk pluto[7328]: updown: RTNETLINK answers: No such process
    2012:01:10-12:03:09 brk pluto[7328]: "S_REF_VOhyqLanfF_0": deleting connection
    2012:01:10-12:03:09 brk pluto[7328]: "S_REF_VOhyqLanfF_0" #4: deleting state (STATE_QUICK_I2)
    2012:01:10-12:03:09 brk pluto[7328]: updown: /sbin/ip -4 route del 192.168.5.0/24 dev eth1 proto ipsec metric 0 failed with status 2:
    2012:01:10-12:03:09 brk pluto[7328]: updown: RTNETLINK answers: No such process
    2012:01:10-12:03:09 brk pluto[7328]: "S_REF_gqSeDxincK_1": deleting connection
    2012:01:10-12:03:09 brk pluto[7328]: "S_REF_gqSeDxincK_0": deleting connection
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface eth0/eth0 2001:1938:1ac::1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface lo/lo ::1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface lo/lo 127.0.0.1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface lo/lo 127.0.0.1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface eth0/eth0 192.168.1.1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface eth0/eth0 192.168.1.1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface eth1/eth1 72.183.yyy.yyy
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface eth1/eth1 72.183.yyy.yyy
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface wlan2/wlan2 192.168.10.1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface wlan2/wlan2 192.168.10.1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface wlan0/wlan0 172.16.28.1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface wlan0/wlan0 172.16.28.1
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface ppp0/ppp0 76.240.zzz.zzz
    2012:01:10-12:03:09 brk pluto[7328]: shutting down interface ppp0/ppp0 76.240.zzz.zzz
    2012:01:10-12:03:09 brk ipsec_starter[7327]: pluto stopped after 160 ms
    2012:01:10-12:03:09 brk ipsec_starter[7327]: ipsec starter stopped


    Starting up



    2012:01:10-12:03:24 brk openl2tpd[9414]: Start, trace_flags=00000000
    2012:01:10-12:03:24 brk openl2tpd[9414]: OpenL2TP V1.6, (c) Copyright 2004,2005,2006,2007,2008 Katalix Systems Ltd.
    2012:01:10-12:03:24 brk openl2tpd[9414]: Loading plugin /usr/lib/openl2tp/ppp_unix.so, version V1.5
    2012:01:10-12:03:24 brk openl2tpd[9414]: Using config file: /etc/openl2tpd.conf
    2012:01:10-12:03:24 brk ipsec_starter[9454]: Starting strongSwan 4.4.1git20100610 IPsec [starter]...
    2012:01:10-12:03:24 brk ipsec_starter[9454]: no default route - cannot cope with %defaultroute!!!
    2012:01:10-12:03:24 brk pluto[9461]: Starting IKEv1 pluto daemon (strongSwan 4.4.1git20100610) THREADS VENDORID CISCO_QUIRKS
    2012:01:10-12:03:24 brk pluto[9461]: loaded plugins: curl ldap aes des blowfish serpent twofish sha1 sha2 md5 random x509 pubkey pkcs1 pgp dnskey pem sqlite hmac gmp xauth attr attr-sql resolve
    2012:01:10-12:03:24 brk pluto[9461]:   including NAT-Traversal patch (Version 0.6c)
    2012:01:10-12:03:24 brk pluto[9461]: Using Linux 2.6 IPsec interface code
    2012:01:10-12:03:24 brk ipsec_starter[9460]: pluto (9461) started after 20 ms
    2012:01:10-12:03:24 brk pluto[9461]: loading ca certificates from '/etc/ipsec.d/cacerts'
    2012:01:10-12:03:24 brk pluto[9461]:   loaded ca certificate from '/etc/ipsec.d/cacerts/REF_peMxNNBjcc.pem'
    2012:01:10-12:03:24 brk pluto[9461]: loading aa certificates from '/etc/ipsec.d/aacerts'
    2012:01:10-12:03:24 brk pluto[9461]: loading ocsp certificates from '/etc/ipsec.d/ocspcerts'
    2012:01:10-12:03:24 brk pluto[9461]: Changing to directory '/etc/ipsec.d/crls'
    2012:01:10-12:03:24 brk pluto[9461]: loading attribute certificates from '/etc/ipsec.d/acerts'
    2012:01:10-12:03:24 brk pluto[9461]: listening for IKE messages
    2012:01:10-12:03:24 brk pluto[9461]: adding interface tun0/tun0 10.242.2.1:500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface tun0/tun0 10.242.2.1:4500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface ppp0/ppp0 76.240.zzz.zzz:500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface ppp0/ppp0 76.240.zzz.zzz:4500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface wlan0/wlan0 172.16.28.1:500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface wlan0/wlan0 172.16.28.1:4500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface wlan2/wlan2 192.168.10.1:500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface wlan2/wlan2 192.168.10.1:4500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface eth0/eth0 192.168.1.1:500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface eth0/eth0 192.168.1.1:4500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface lo/lo 127.0.0.1:500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface lo/lo 127.0.0.1:4500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface aiccu/aiccu 2001:1938:80:1d4::2:500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface lo/lo ::1:500
    2012:01:10-12:03:24 brk pluto[9461]: adding interface eth0/eth0 2001:1938:1ac::1:500
    2012:01:10-12:03:24 brk pluto[9461]: loading secrets from "/etc/ipsec.secrets"
    2012:01:10-12:03:24 brk pluto[9461]:   loaded PSK secret for 72.183.yyy.yyy %any
    2012:01:10-12:03:24 brk pluto[9461]:   loaded PSK secret for 72.183.yyy.yyy 70.123.***.***
    2012:01:10-12:03:24 brk pluto[9461]: added connection description "S_REF_VOhyqLanfF_0"
    2012:01:10-12:03:24 brk pluto[9461]: "S_REF_VOhyqLanfF_0": we have no ipsecN interface for either end of this connection
    2012:01:10-12:03:24 brk pluto[9461]: added connection description "S_REF_VOhyqLanfF_1"
    2012:01:10-12:03:24 brk pluto[9461]: "S_REF_VOhyqLanfF_1": we have no ipsecN interface for either end of this connection
    2012:01:10-12:03:24 brk pluto[9461]: added connection description "S_REF_gqSeDxincK_0"
    2012:01:10-12:03:24 brk pluto[9461]: added connection description "S_REF_gqSeDxincK_1"


    and that is the bottom of the log at this point.

    I don't know if this is how it acted before 8.300.  It was just an accident I stepped into this problem.

    Not sure how big of a deal it really is, but I would think everything should 'just work' after the interface is re-enabled.

    Also, I would expect the interface to be reported as [down] when it is disabled in the interface tab.

    Thanks for looking into this and all the prompt replies!  I am functioning now, so it isn't a huge deal for me.  Just letting you know so no one else gets surprised.