[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

RE: [Openvpn-users] Up-script problem


  • Subject: RE: [Openvpn-users] Up-script problem
  • From: "Tibbs, Richard" <rwtibbs@xxxxxxxxxxx>
  • Date: Sat, 4 Dec 2004 21:03:51 -0500

Modified the script to be
#!/bin/sh -e 
/sbin/ip route add $1 $2 $3 $4 $5 $6
But same outcome "... shell failed with error status 1."

I checked the -e parameter and it is stops the script immediately if any
command fails. 
Higher up in daemon.log openvpn calls the script this way:
Dec  4 21:55:39 firewall openvpn[9273]: /etc/openvpn/openvpn.up tun0
1500 1576 10.1.1.1 10.1.1.2 init

10.1.1.1 is the local vpn endpoint and 10.1.1.2 is intended to be my
laptop over wireless.  Looking at the openvpn howto, and the ip man
page, (http://annys.eines.info/cgi-bin/man/man2html?ip+8) I am thinking
I must need something like
        
/sbin/ip route add $4/32 mtu $2 nexthop dev $1 

I am pretty sure 1500 and 1576 are the result of my attempts to obtain
compatibility with 2.x openvpn on my winXP laptop. 
Have not a clue what to do with the 1576 or the other tunnel endpoint.

Can anyone give me some help here?
Rick.

My config is

dev tun
# For compatability with 2.x openvpn clients/servers
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
# When using TLS-security (tls-server) uncomment this for 2.x
#key-method 2

local 216.x.y.x # anonymized...
# Our remote peer (office subnet)
#remote 137.p.q.r
# Remote peer (wireless internal w/o RU vpn)
remote 192.168.1.3

# 10.1.1.1 is our local VPN endpoint
# 10.1.1.2 is our remote VPN endpoint (home wlan)
ifconfig 10.1.1.1 10.1.1.2
up /etc/openvpn/openvpn.up


-----Original Message-----
From: openvpn-users-admin@xxxxxxxxxxxxxxxxxxxxx
[mailto:openvpn-users-admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of
Jean-Pierre Schwickerath
Sent: Saturday, December 04, 2004 7:52 PM
To: openvpn-users@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Openvpn-users] Up-script problem



> I am using openvpn 1.6 on 2.4.20 kernel with the ip route command
> available (no bash, just plain shell).  I have tried several script
> lines to add the route. These are:
> #!/bin/sh -e
> ip route add 10.1.1.0 255.255.255.0 nexthop $5
> 
> #!/bin/sh -e
> ip route add $1
> 
> #!/bin/sh -e
> ip route add $1 $2 $3 $4 $5 $6
> 
> In each case I get the message in daemon.log
> Dec  4 19:11:58 firewall openvpn[3939]: /etc/openvpn/openvpn.up tun0
> 1256 1300 10.1.1.1 10.1.1.2 init
> Dec  4 19:11:58 firewall openvpn[3939]: script failed: shell command
> exited with error status: 2
> Dec  4 19:11:58 firewall openvpn[3939]: Exiting
> 
> Can anybody tell me how to get the script to succeed?

I'm not sure but maybe a few things to check:

- is your file executable for the user running openvpn?
- did you try to run the script without "-e"?
- could you try to enter the full path to "ip"?

Otherwise, check what error code 2 is for your shell?

Jean-Pierre

-- 
Powered by Linux From Scratch - http://schwicky.net/
PGP Key ID: 0xEE6F49B4 - AIM/Jabber: Schwicky - ICQ: 4690141

Nothing is impossible... Everything is relative!

____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users


____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users