[Bug 1193614] Re: Openvpn is unable to assign dhcp from remote LAN in up/down scripts

sefs 1193614 at bugs.launchpad.net
Sat Jun 22 22:49:35 UTC 2013


** Description changed:

  Hi,
  
  When setting up Openvpn in bridged mode, openvpn is unable to configure
  the tap interface on the client for dhcp from the remote LAN.
  
  Server:
  -----------------------------------------------------------------------------
  ...
  server-bridge
  push "route-gateway 192.168.1.1"
  push "redirect-gateway def1 bypass-dhcp"
  client-to-client
  ...
  
  Client:
  -----------------------------------------------------------------------------
  ...
  
  up /etc/openvpn/dhcp.sh
  down /etc/openvpn/dhcp.sh
  ...
  
  dhcp.sh:
  -----------------------------------------------------------------------------
  #!/bin/bash
- # 
- [ -x /sbin/dhclient] || exit 0
+ #
+ [ -x /sbin/dhclient ] || exit 0
  
  case $script_type in
  
  up)
- 	dhclient -v "${dev}"
- 	;;
+  dhclient -v "${dev}"
+  ;;
  down)
- 	dhclient -r "${dev}"
- 	;;
+  dhclient -r "${dev}"
+  ;;
  esac
  
  dhclient attempts to configure tap interface on client but eventually
  times out.
  
  Errors:
  -----------------------------------------------------------------------------
  ...
  Sat Jun 22 07:40:02 2013 TUN/TAP device tap0 opened
  Sat Jun 22 07:40:02 2013 TUN/TAP TX queue length set to 100
  Sat Jun 22 07:40:02 2013 /sbin/route add -net xxx.xxx.xxx.xxx netmask 255.255.255.255 gw 192.168.2.1
  Sat Jun 22 07:40:02 2013 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 192.168.1.1
  SIOCADDRT: No such process
  Sat Jun 22 07:40:02 2013 ERROR: Linux route add command failed: external program exited with error status: 7
  Sat Jun 22 07:40:02 2013 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 192.168.1.1
  SIOCADDRT: No such process
  Sat Jun 22 07:40:02 2013 ERROR: Linux route add command failed: external program exited with error status: 7
  Sat Jun 22 07:40:02 2013 Initialization Sequence Completed
  
  and on shutting down connection:
  Errors:
  -----------------------------------------------------------------------------
  Sat Jun 22 07:42:28 2013 event_wait : Interrupted system call (code=4)
  Sat Jun 22 07:42:28 2013 SIGTERM received, sending exit notification to peer
  Sat Jun 22 07:42:31 2013 TCP/UDP: Closing socket
- Sat Jun 22 07:42:31 2013 /sbin/route del -net 69.73.224.249 netmask 255.255.255.255
+ Sat Jun 22 07:42:31 2013 /sbin/route del -net xxx.xxx.xxx.xxx netmask 255.255.255.255
  Sat Jun 22 07:42:31 2013 /sbin/route del -net 0.0.0.0 netmask 128.0.0.0
  SIOCDELRT: No such process
  Sat Jun 22 07:42:31 2013 ERROR: Linux route delete command failed: external program exited with error status: 7
  Sat Jun 22 07:42:31 2013 /sbin/route del -net 128.0.0.0 netmask 128.0.0.0
  SIOCDELRT: No such process
  Sat Jun 22 07:42:31 2013 ERROR: Linux route delete command failed: external program exited with error status: 7
  Sat Jun 22 07:42:31 2013 Closing TUN/TAP interface
  Sat Jun 22 07:42:31 2013 SIGTERM[soft,exit-with-notification] received, process exiting

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openvpn in Ubuntu.
https://bugs.launchpad.net/bugs/1193614

Title:
  Openvpn is unable to assign dhcp from remote LAN in up/down scripts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openvpn/+bug/1193614/+subscriptions



More information about the Ubuntu-server-bugs mailing list