Comment 0 for bug 1193614

Revision history for this message
sefs (sefsinc) wrote :

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

case $script_type in

up)
 dhclient -v "${dev}"
 ;;
down)
 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 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