View previous topic :: View next topic |
Author |
Message |
mostro n00b
Joined: 20 May 2005 Posts: 26
|
Posted: Thu Jan 12, 2006 4:14 am Post subject: problem with openvpn + tap0 + dhcpcd |
|
|
Hi all:
I configured openvpn+tap to secure my home wireless network. Everything works really well, but I have a problem I have not been able to figure out. Actually, two problems:
1. When my gentoo system (laptop) boots, the net.tap0 service will not start properly because the dhcpcd daemon can not contact the dhcp server. This is happening, because openvpn is not running yet (of course). If openvpn starts before the net.tap0 interface, then the net.tap0 interface does not start iether, it just does not give an error or anything. Basicly, I need a way to start net.tap0 (with the dhcpcd daemon running in the background) and then start openvpn. Or some other solution...
I can get it to work with something like this:
#!/bin/bash
# create the tap interface:
tunctl
# start dhcpcd on it:
dhcpcd tap0 &
# Now, start openvpn:
/etc/init.d/openvpn start
# End of script.
I just don't know how to make the Gentoo rc scripts du it. Any ideas on how to get this working?
2. Every time my system boots, the dhcp server on the server machine gives the client's tap interface a different IP address. This is happening, because the mac address of the tap interface changes every time openvpn is restarted. So, how can I specify a persistent mac address for the tap0 interface?
Thank you.
David Bruzos |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
mostro n00b
Joined: 20 May 2005 Posts: 26
|
Posted: Thu Jan 12, 2006 6:21 pm Post subject: |
|
|
What?
I am not sure if you are saying that there is no current way to solve this problem. Is that what you are saying?
Also, is there a way to make the net.tap0 script ignore the already created tap0 interface and just continue with the dhcpcd step. If you could do that, I openvpn could start first and then the net.tap0 interface could start without problems. This would not require a new module for openvpn. Just a simple check somewhere in the main net.lo script. Something like:
code:
if tap 0; then
do whatever
else
create tap0
do whatever
fi
This is because, openvpn would create the tap0 interface and the net.tap0 script would just have to run dhcpcd on it...
However, I am not sure that this would solve the persistent mac address problem.
David B. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
|