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

Re: [Openvpn-users] Bridging on Redhat 9


  • Subject: Re: [Openvpn-users] Bridging on Redhat 9
  • From: Tim Vaughan <tim@xxxxxxxxxxxxxxxx>
  • Date: Tue, 13 Apr 2004 17:50:58 +0100

Having read the article on fedoranews.org about Implementing OpenVPN (http://fedoranews.org/contributors/florin_andrei/openvpn/), I tried running the script he mentions to create the bridge. It works ok, but once it's run the computer is no longer able to access the internet. Trying "ifconfig br0 gateway 192.168.1.1" fails: "Temporary failure in name resolution".


Try "ifconfig br0 192.168.1.x", using the IP address formerly used by
eth0. Be sure to set "ifconfig eth0 0.0.0.0" first.

The gateway is set up in the routing table, using the route command.
ifconfig only sets up the interface, and knows nothing about gateways.
So it looks to me that your command is trying to resolve "gateway" to an
IP address, and assign that to br0.

Thanks a lot for the advice. In fact, having struggled a bit this afternoon I decided to try a simpler script:


/sbin/modprobe tun
/sbin/modprobe bridge
ifconfig eth0 down
route del default
openvpn --mktun --dev tap0
openvpn --mktun --dev tap1
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 tap0
brctl addif br0 tap1
ifconfig eth0 0.0.0.0 promisc up
ifconfig tap0 0.0.0.0 promisc up
ifconfig tap1 0.0.0.0 promisc up
ifconfig br0 192.168.1.33 netmask 255.255.255.0 broadcast 192.168.1.255
route add default gw 192.168.1.1



This seems to work ok - if I run this while logged in remotely via ssh the connection drops out for about thirty seconds but comes back and I can access the internet fine as usual. However, I've run into another problem now. Running OpenVPN on a .ovpn file similar to the one mentioned in the article gives me the error "Socket bind failed on local address xxx.xxx.xxx.xxx:5000: Cannot assign requested address", where xxx.xxx.xxx.xxx is the external IP address of the modem/router which does NAT etc. for the local network. Is this a problem with the routing on my Redhat machine?


Tim

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