Find the answer to your Linux question:
Results 1 to 5 of 5
Hi i'm having a strange issue. I have 2 linux servers in different locations. I need to setup a ip tunnel. I follow this steps on both servers: Server1: ip ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    2

    ip tunnel


    Hi i'm having a strange issue.

    I have 2 linux servers in different locations.
    I need to setup a ip tunnel. I follow this steps on both servers:

    Server1:

    ip tunnel add tun0 mode ipip local IP_Server1 remote IP_Server2 dev ethX
    ip l s tun0 up
    ip a a 10.10.10.1 peer 10.10.10.2 dev tun0

    Server2:

    ip tunnel add tun0 mode ipip local IP_Server2 remote IP_Server1 dev ethX
    ip l s tun0 up
    ip a a 10.10.10.2 peer 10.10.10.1 dev tun0

    After creating the tunnel everything is ok, but after a time(maybe some hours), i can't ping the other end of the tunnel(ping to IP_Server1 and IP_Server2 is ok all the time; the connection to internet is very reliable). I try "ipip" and "gre" mode, but same result.

    If I ping from two servers the other end of the tunnel, the connection is again established for some hours and ping is working in both directions.(if I ping only from one side the ping is not working)

    How I can resolve this issue for no longer having to log on both servers to ping the other end of the tunnel?If I use an crondjob to ping the other end of the tunnel at 2 hours everything is working fine for weeks, but I need other solution.

  2. #2
    Just Joined!
    Join Date
    Mar 2005
    Location
    Corona, CA
    Posts
    29
    It could be that the persistence or state table is timing out after a while, and the connection gets blocked when it tries to re-establish itself. Not sure if this would be a network firewall, or iptables on one of the servers. Just a guess.

  3. #3
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Just curious, why is the cron job not an acceptable solution?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Apr 2011
    Posts
    2
    I don't have any rule in iptables on both servers.
    I need a better solution, not a ping in crondjob.

  6. #5
    Just Joined!
    Join Date
    Sep 2007
    Location
    Silver Spring, MD
    Posts
    95

    Tunnel working on one side

    Quote Originally Posted by swlnx View Post
    I don't have any rule in iptables on both servers.
    I need a better solution, not a ping in crondjob.
    Can you be more descriptive regarding your existing network layout.

    And if you have a diagram, this would give us an idea of how your network is configured on both ends so we can come up with the best solution.

    Todd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •