[SOLVED] Client has no ip addressed assigned
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 7
- Joined: Tue Oct 04, 2011 12:25 pm
[SOLVED] Client has no ip addressed assigned
Hi,
I'm using bridged openvpn server and the openvpn 'dhcp' emulation (server-bridge instruction in my server.conf) to assign ip addresses to my clients. When I connect to it, I see no errrors in logs and everthing seems to be fine. However, the tap0 interface on the client side has no ip address assigned.
If I set up one manually using ifconfig, it works fine and I can browser my local network.
Any idea anyone?
I'm using bridged openvpn server and the openvpn 'dhcp' emulation (server-bridge instruction in my server.conf) to assign ip addresses to my clients. When I connect to it, I see no errrors in logs and everthing seems to be fine. However, the tap0 interface on the client side has no ip address assigned.
If I set up one manually using ifconfig, it works fine and I can browser my local network.
Any idea anyone?
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Client has no ip addressed assigned
this is "by design" : server-bridge + remote DHCP has the side effect that the openvpn client does not bring up the tap0 interface by itself - this is left to the OS; on windows this is done automagically, on linux you need to run something like 'dhclient tap0' ; this can be added to the client config using
Code: Select all
script-security 2
up /sbin/dhclient tap0
-
- OpenVpn Newbie
- Posts: 7
- Joined: Tue Oct 04, 2011 12:25 pm
Re: Client has no ip addressed assigned
Thanks for the answer.
So I can only, if using linux, get an ip from my dhcp server so not from the range defined in the server-bridge instruction?
So I can only, if using linux, get an ip from my dhcp server so not from the range defined in the server-bridge instruction?
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Client has no ip addressed assigned
whoops I may have misread you:
if you use
or something similar then the VPN client Is assigned an address from the 'server-bridge' address pool.
if you use
Code: Select all
server-bridge 10.8.0.1 255.255.255.0 10.8.0.100 10.8.0.200
-
- OpenVpn Newbie
- Posts: 7
- Joined: Tue Oct 04, 2011 12:25 pm
Re: Client has no ip addressed assigned
Weird :
I have server-bridge in my server.conf but as I said, I got no ip. When I do , I receive one but I guess it then comes from the real dhcp server not the openvpn server ip pool.

I have server-bridge
Code: Select all
172.16.0.1 255.255.255.0 172.16.0.90 172.16.0.99
Code: Select all
dhclient tap0

- Mimiko
- Forum Team
- Posts: 1564
- Joined: Wed Sep 22, 2010 3:18 am
Re: Client has no ip addressed assigned
Will be interesting to see client log with verb 3 where it must ask for ip.
-
- OpenVpn Newbie
- Posts: 7
- Joined: Tue Oct 04, 2011 12:25 pm
- Mimiko
- Forum Team
- Posts: 1564
- Joined: Wed Sep 22, 2010 3:18 am
Re: Client has no ip addressed assigned
After using dhclient what ip does tap0 get?
Did you check the firewall on server, may be it blocks input or output packets on bridge for tap end.
Did you check the firewall on server, may be it blocks input or output packets on bridge for tap end.
-
- OpenVpn Newbie
- Posts: 7
- Joined: Tue Oct 04, 2011 12:25 pm
Re: Client has no ip addressed assigned
I receive 172.16.0.241 so obviously not coming from the openvpn pool.
Ya, i used iptables but I was sure everything was correctly set up :
Not that all INPUT and FORWARD are dropped by default :
#OPENVPN
iptables -A INPUT -i $EXTERNAL_INT -m state --state NEW,ESTABLISHED,RELATED -p udp --dport 1194 -j ACCEPT
iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT
iptables -A FORWARD -i $EXTERNAL_INT -o br0 -m state --state ESTABLISHED,RELATED -j ACCEPT
Ya, i used iptables but I was sure everything was correctly set up :
Not that all INPUT and FORWARD are dropped by default :
#OPENVPN
iptables -A INPUT -i $EXTERNAL_INT -m state --state NEW,ESTABLISHED,RELATED -p udp --dport 1194 -j ACCEPT
iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT
iptables -A FORWARD -i $EXTERNAL_INT -o br0 -m state --state ESTABLISHED,RELATED -j ACCEPT
- Mimiko
- Forum Team
- Posts: 1564
- Joined: Wed Sep 22, 2010 3:18 am
Re: Client has no ip addressed assigned
Interesting problem you have. Can you also check firewall on client for tun adapter?
Show complet server config, the log, the routing table, the interface configuration, and the output of iptables -L -n and iptables -L -t nat.
Show complet server config, the log, the routing table, the interface configuration, and the output of iptables -L -n and iptables -L -t nat.
-
- OpenVpn Newbie
- Posts: 7
- Joined: Tue Oct 04, 2011 12:25 pm
Re: Client has no ip addressed assigned
Iptables server : http://pastebin.com/qBehcw1b
IpTables client : http://pastebin.com/sfMamSky
server.conf : http://pastebin.com/ry2tesma
client.conf : http://pastebin.com/ExdzVnWj
server interfaces: http://pastebin.com/b0GLgqej
client interfaces: http://pastebin.com/LHicZf03
Thanks,
IpTables client : http://pastebin.com/sfMamSky
server.conf : http://pastebin.com/ry2tesma
client.conf : http://pastebin.com/ExdzVnWj
server interfaces: http://pastebin.com/b0GLgqej
client interfaces: http://pastebin.com/LHicZf03
Thanks,
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Client has no ip addressed assigned
your client config contains only 'tls-client', not 'client' : the result is that settings from the server are not pulled in (which I also could not find in the cllient log).
Either use
or add
to the client config file.
Either use
Code: Select all
client
Code: Select all
pull
-
- OpenVpn Newbie
- Posts: 7
- Joined: Tue Oct 04, 2011 12:25 pm
Re: Client has no ip addressed assigned
That did it!
Thank you guys for your fast answers. Now I'm getting an ip form the pool.
Thank you guys for your fast answers. Now I'm getting an ip form the pool.
