ipp.txt problem

This forum is for admins who are looking to build or expand their OpenVPN setup.

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.
Post Reply
secoonder
OpenVpn Newbie
Posts: 14
Joined: Sat Feb 27, 2016 11:24 am

ipp.txt problem

Post by secoonder » Sat Mar 26, 2016 9:33 am

Hello
ı am using openvpn server on Linux.i have created vpn client successfully.
Open Vpn Users can succesfully connect to My Open Vpn server .
But i can not configured "ipp.txt" file.
For Example ;
for client1;
cat /etc/openvpn/ccd/client1
ifconfig-push 10.2.1.9 10.2.1.10
There is no problem on the top line.the client1 assigned 10.2.1.9

i added the line in /etc/openvpn/ipp.txt
client1,10.2.1.9
There is no problem on the top line.

When i restarted openvpn Server,the client didnt re-connect.

i looked ip.txt file.i was very amazing,because ipp.txt file is emtpy ? :o :o

Shortly,When i restarted openvpn Server,ipp.txt file is empty.
My server.conf is
port 1194
proto tcp
dev tun
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/gwfiber.crt
key /etc/openvpn/easy-rsa/keys/gwfiber.key
dh /etc/openvpn/easy-rsa/keys/dh2048.pem
server 10.2.1.0 255.255.255.0
push "route 192.168.3.0 255.255.255.0"
push "route 192.168.55.0 255.255.255.0"
client-config-dir /etc/openvpn/ccd
ifconfig-pool-persist /etc/openvpn/ipp.txt 10
push "dhcp-option DNS 8.8.8.8"
client-to-client
keepalive 10 120
cipher BF-CBC
persist-key
persist-tun
log-append /var/log/openvpn.log
verb 3
Can you help me.? Thank you very much for your help

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: ipp.txt problem

Post by Traffic » Sat Mar 26, 2016 1:07 pm

secoonder wrote:i added the line in /etc/openvpn/ipp.txt
client1,10.2.1.9
There is no problem on the top line.

When i restarted openvpn Server,the client didnt re-connect.

i looked ip.txt file.i was very amazing,because ipp.txt file is emtpy ?
you cannot use this file to save settings.

Use the CCD file as you have done.

secoonder
OpenVpn Newbie
Posts: 14
Joined: Sat Feb 27, 2016 11:24 am

Re: ipp.txt problem

Post by secoonder » Sat Mar 26, 2016 2:55 pm

Traficc thank you very much for your answer,but the problem is not solved.
i moved ipp.txt file in ccd folder.
And than i edited ifconfig-pool-persist /etc/openvpn/ccd/ipp.txt
root@xxxxr:/etc/openvpn/ccd# ls -l
-rw-r--r-- 1 root root 67 Mar 25 13:40 client1
-rwxrwxr-x 1 root root 0 Mar 26 16:45 ipp.txt

i added client1,10.2.1.9 in ipp.txt file.
i restarted openvpn server.But the file was again empty. :(
When i restarted to my open vpn server,my openvpn server log is

Code: Select all

Sat Mar 26 16:47:50 2016 /sbin/ip addr add dev tun0 local 10.2.1.1 peer 10.2.1.2
Sat Mar 26 16:47:50 2016 /sbin/ip route add 10.2.1.0/24 via 10.2.1.2
Sat Mar 26 16:47:50 2016 Listening for incoming TCP connection on [undef]
Sat Mar 26 16:47:50 2016 TCPv4_SERVER link local (bound): [undef]
Sat Mar 26 16:47:50 2016 TCPv4_SERVER link remote: [undef]
Sat Mar 26 16:47:50 2016 MULTI: multi_init called, r=256 v=256
Sat Mar 26 16:47:50 2016 IFCONFIG POOL: base=10.2.1.4 size=62, ipv6=0
Sat Mar 26 16:47:50 2016 IFCONFIG POOL LIST
Sat Mar 26 16:47:50 2016 MULTI: TCP INIT maxclients=100 maxevents=104
Sat Mar 26 16:47:50 2016 Initialization Sequence Completed
When i restarted to my openvpn server,My vpnclient1 is connectionnormally lost.Client log is ;

Code: Select all

root@yyyyy:/etc/openvpn# Sat Mar 26 16:42:25 2016 Connection reset, restarting [0]
Sat Mar 26 16:42:25 2016 /sbin/ip route del 10.2.1.0/24
Sat Mar 26 16:42:25 2016 /sbin/ip route del 192.168.55.0/24
Sat Mar 26 16:42:25 2016 /sbin/ip route del 192.168.3.0/24
Sat Mar 26 16:42:25 2016 Closing TUN/TAP interface
Sat Mar 26 16:42:25 2016 /sbin/ip addr del dev tun0 local 10.2.1.9 peer 10.2.1.10
Sat Mar 26 16:42:25 2016 SIGUSR1[soft,connection-reset] received, process restarting
Sat Mar 26 16:42:25 2016 Restart pause, 5 second(s)
But then,client cannot again connection.
Can you help me ? regards

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: ipp.txt problem

Post by Traffic » Sat Mar 26, 2016 3:44 pm

secoonder wrote:root@xxxxr:/etc/openvpn/ccd# ls -l
<s>
-rwxrwxr-x 1 root root 0 Mar 26 16:45 ipp.txt
i added client1,10.2.1.9 in ipp.txt file.
You cannot add "client1,10.2.1.9" to this file!

Use this file:
secoonder wrote:root@xxxxr:/etc/openvpn/ccd# ls -l
-rw-r--r-- 1 root root 67 Mar 25 13:40 client1
Add:

Code: Select all

ifconfig-push 10.2.1.9 10.2.1.10
exactly as you have done ..

secoonder
OpenVpn Newbie
Posts: 14
Joined: Sat Feb 27, 2016 11:24 am

Re: ipp.txt problem

Post by secoonder » Sun Mar 27, 2016 9:12 am

Traficc thank you for your answer.
I have already written it
root@xx:/etc/openvpn/ccd# more client1
ifconfig-push 10.2.1.9 10.2.1.10

i noticed someting.When client1 connect from windows computer,it was no problem.
(When i restarted server,the client1 auto reconnect server.)
But client1 cannot reconnect from ubuntu.

was it related this line in server.conf?

Code: Select all

# It's a good idea to reduce the OpenVPN
# daemon's privileges after initialization.
#
# You can uncomment this out on
# non-Windows systems.

;user nobody
;group nogroup

secoonder
OpenVpn Newbie
Posts: 14
Joined: Sat Feb 27, 2016 11:24 am

Re: ipp.txt problem

Post by secoonder » Sun Mar 27, 2016 1:21 pm

Traffic Thank you for your answer.
I already did it

Code: Select all

root@xxx:/etc/openvpn/ccd# more client1
ifconfig-push 10.2.1.9 10.2.1.10
My client re-connect assigned ip 10.2.1.9.it is not problem for ip.
the problem is exactly that

When i restarted openvpn server,the vpn client normaly connection down.But the vpn client did not reconnect :(
client log is

Code: Select all

Sun Mar 27 16:09:03 2016 Connection reset, restarting [0]
Sun Mar 27 16:09:03 2016 TCP/UDP: Closing socket
Sun Mar 27 16:09:03 2016 /sbin/route del -net 10.2.1.0 netmask 255.255.255.0
Sun Mar 27 16:09:03 2016 /sbin/route del -net 192.168.55.0 netmask 255.255.255.0
Sun Mar 27 16:09:03 2016 /sbin/route del -net 192.168.3.0 netmask 255.255.255.0
Sun Mar 27 16:09:03 2016 Closing TUN/TAP interface
Sun Mar 27 16:09:03 2016 /sbin/ifconfig tun0 0.0.0.0
Sun Mar 27 16:09:03 2016 SIGUSR1[soft,connection-reset] received, process restart
[b]Sun Mar 27 16:09:03 2016 Restart pause, 5 second(s)[/b]
But ,when i was manually running the openvpn client,

Code: Select all

[b]openvpn --config /etc/openvpn/client1.ovpn"[/b]
The client connect succesfully.
Can you help me ?Regards

Post Reply