This forum is for admins who are looking to build or expand their OpenVPN setup.
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
Wataru
- OpenVpn Newbie
- Posts: 6
- Joined: Tue Jun 25, 2013 5:40 pm
Post
by Wataru » Tue Jun 25, 2013 5:47 pm
Hello to all,
i've a very strange situation, configuring last OpenVpn on last OpenWRT (12.09)
got information at most from
http://openvpn.net/index.php/open-sourc ... tml#server and
http://wiki.openwrt.org/inbox/vpn.howto
and it works! but in very strange way:
i'm trying to give fixed ip to one client, and from some moment server gets NOT *.1 ip but *.5! and client gets ip neither i gave nor from dhcp range!
Here is server config (UCI), i'm using not bridged config:
Code: Select all
config openvpn 'lan'
option 'enabled' '1'
option 'port' '10536'
option 'proto' 'udp'
option 'dev' 'tun'
option 'ca' '/etc/openvpn/ca.crt'
option 'cert' '/etc/openvpn/server.crt'
option 'key' '/etc/openvpn/server.key'
option 'dh' '/etc/openvpn/dh1024.pem'
option 'server' '10.0.0.0 255.255.255.0'
#option 'mode' 'server'
#option 'ifconfig' '10.0.0.1 255.255.255.0'
#option 'ifconfig-pool' '10.0.0.2 10.0.0.5'
option 'ifconfig-pool-persist' '/etc/config/ovpn_cl/ipp.txt'
list 'push' 'route 192.168.1.0 255.255.255.240'
list 'push' 'redirect-gateway'
list 'push' 'dhcp-option DNS 10.0.0.1'
option 'client_to_client' '1'
option 'keepalive' '10 120'
option 'max_clients' '3'
option 'persist_key' '1'
option 'persist_tun' '1'
option 'status' '/tmp/openvpn-status.log'
option 'verb' '6'
#option 'client-config-dir' '/etc/config/ovpn_cl'
-
Wataru
- OpenVpn Newbie
- Posts: 6
- Joined: Tue Jun 25, 2013 5:40 pm
Post
by Wataru » Thu Jun 27, 2013 8:57 am
Linux forums are the same ever...
-
Wataru
- OpenVpn Newbie
- Posts: 6
- Joined: Tue Jun 25, 2013 5:40 pm
Post
by Wataru » Thu Jun 27, 2013 11:00 am
Hi Wataru,
i've had the same problem, and there are more same questions concerning another platforms (not only OpenWrt) in internet,
here
http://www.linux.org.ru/forum/general/6091471 is for example one of solutions.
I really can not understand why we can't find it in OFFICIAL DOCUMENTATION or SAMPLE CONFIG... (
Last edited by
Wataru on Thu Jun 27, 2013 11:04 am, edited 1 time in total.
-
Wataru
- OpenVpn Newbie
- Posts: 6
- Joined: Tue Jun 25, 2013 5:40 pm
Post
by Wataru » Thu Jun 27, 2013 11:03 am
Hi Wataru,
it works now, many thanks.
I think will be placed in OpenVPN FAQ or something.
P.S. It's really fun to chat with self xD
-
Wataru
- OpenVpn Newbie
- Posts: 6
- Joined: Tue Jun 25, 2013 5:40 pm
Post
by Wataru » Thu Jun 27, 2013 11:38 am
But my main problem is still not solved:
clients did not get fixed ip's i'm giving them,
i've tried to use client-config-dir and ipp.txt, but all of my clients (2 winXPs and android) or maybe server itselft just ignoring all this settings.
-
Wataru
- OpenVpn Newbie
- Posts: 6
- Joined: Tue Jun 25, 2013 5:40 pm
Post
by Wataru » Fri Jun 28, 2013 8:27 am
Looks like i had solved it, but in a very strange way.
Half of parameter do not work as they described in docs, and they are described 100500 different ways in many different manuals.
So, if you using UCI, you need this:
- DELETE (not comment) strings "ifconfig-pool" and all about "ccd" in server config file
- add " option 'topology' 'subnet' " to server config file
- add path to your ipp.txt, mine is '/etc/config/ccd/ipp.txt' , '/tmp/openvpn/ipp.txt' also worked
- delete ALL WRITE PREMISSIONS to ipp.txt. Parameter 0 in '/etc/config/ccd/ipp.txt 0' IS NOT WORKING, and openvpn wipes file at every start
- add you clients, like " client1,10.0.0.5 " without quotes, to ipp.txt
- restart openvpn