Menu

multiple hosts in conf wont work?

Help
edward.mzj
2016-12-04
2016-12-04
  • edward.mzj

    edward.mzj - 2016-12-04

    vtund complains "Invalid clause 'xxx' line yyy"
    works flawlessly when only one host defined.

    have tried the latest version but with no luck
    btw, the latest version wont start either with or without -s option.

    root@rtp:/etc# uname -a
    Linux rtp 3.16.0-4-686-pae #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) i686 GNU/Linux
    root@rtp:/etc#
    ### vtun, debian deb 
    root@rtp:/etc# /usr/sbin/vtund
    VTun ver 3.X 05/15/2013
    Usage:
      Server:
            vtund <-s> [-f file] [-P port] [-L local address]
      Client:
            vtund [-f file] [-p] [-m] [-t timeout] <host profile> <server address>
    root@rtp:/etc#
    root@rtp:/etc# /usr/sbin/vtund -s -f /etc/vtund.cfg
    vtund[5389]: Invalid clause 'myhome2' line 36
    root@rtp:/etc#
    ### latest version
    root@rtp:/etc# /usr/local/sbin/vtund -s -f /etc/vtund.cfg
    vtund: invalid option -- 's'
    VTun ver 3.X 12/04/2016
    Usage:
      Server:
            vtund <-i> [-f file] [-P port] [-L local address]
      Client:
            vtund [-f file] [-q] [-p] [-m] [-t timeout] <host profile> <server address>
    root@rtp:/etc#
    root@rtp:/etc# /usr/local/sbin/vtund -i -f /etc/vtund.cfg
    vtund[5419]: Invalid clause 'myhome2' line 36
    root@rtp:/etc#
    root@rtp:/etc# cat vtund.cfg
    options {
      port 5000;            # Listen on this port.
      bindaddr { iface eth0; };   # Listen only on loopback device.
    
      # Syslog facility
      syslog        daemon;
    
      # Path to various programs
      ppp           /usr/sbin/pppd;
      ifconfig      /sbin/ifconfig;
      route         /sbin/route;
      firewall      /sbin/ipchains;
      ip            /sbin/ip;
    }
    
    # Default session options
    default {
      compress no;          # Compression is off by default
      speed 0;              # By default maximum speed, NO shaping
      encrypt  no;          # Encryption
    }
    
    myhome1 {
      passwd  xxx;    # Password
      type  tun;            # IP tunnel
      #proto udp;            # UDP protocol
      proto tcp;            # UDP protocol
      keepalive yes;        # Keep connection alive
    
      up {
        ifconfig "%% 10.0.1.128 pointopoint 10.0.1.129 mtu 1450";
      }
    }
    
    myhome2 {
      passwd  xxx;    # Password
      type  tun;            # IP tunnel
      #proto udp;            # UDP protocol
      proto tcp;            # UDP protocol
      keepalive yes;        # Keep connection alive
    
      up {
        ifconfig "%% 10.0.1.128 pointopoint 10.0.1.130 mtu 1450";
      }
    }
    
     

    Last edit: edward.mzj 2016-12-04
  • Bishop

    Bishop - 2016-12-04
    $ sed '/up/,/}/s/}/};/' vtund.conf | diff -u vtund.conf -
    --- vtund.conf  2016-12-04 00:35:42.000000000 -0500
    +++ -   2016-12-04 00:35:45.683386000 -0500
    @@ -30,7 +30,7 @@
    
       up {
         ifconfig "%% 10.0.1.128 pointopoint 10.0.1.129 mtu 1450";
    
    -  }
    +  };
     }
    
     myhome2 {
    @@ -42,6 +42,6 @@
    
       up {
         ifconfig "%% 10.0.1.128 pointopoint 10.0.1.130 mtu 1450";
    
    -  }
    +  };
     }
    
     

Log in to post a comment.

MongoDB Logo MongoDB