Opened 7 years ago

Closed 7 years ago

#265 closed Bug / Defect (worksforme)

p-t-p address assigned as client ip

Reported by: ggalitz Owned by:
Priority: major Milestone:
Component: Networking Version: OpenVPN 2.2.2 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

With a server configuration of:

openvpn.conf:

topology subnet

server 10.1.8.128 255.255.255.128
ifconfig-pool-persist ipp.txt 60

ifconfig:

tun1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.1.8.129  P-t-P:10.1.8.130  Mask:255.255.255.255

The P-t-P address on the server is allocated as a client IP for the first connecting VPN client on the dynamic pool... therefore the first connecting client busts.

OS: Centos 6.2
Package: openvpn-2.2.2-1.el6.x86_64

Change History (2)

comment:1 Changed 7 years ago by JoshC

Something appears wrong with your setup or OS handling of the configuration parameters.

With the subnet topology, the device is in a PtP mode, but the adapter is configured with an address and netmask like a traditional network. Your output shows this is not the case and it is using a PtP configuration with an IP as the peer. When used with a net30 or p2p topology, you get a traditional PtP setup on *nix systems, but not with subnet.

I've tested this myself on 64-bit CentOS 6.4 with openvpn 2.2.2 from RPM Forge, plus sources I built from the official OpenVPN tarballs for 2.2.2 and 2.3.1, all of which operate as expected, both when openvpn is built to use ifconfig (the default) and iproute2's ip tool (when configured with --enable-iproute2.)

This is the output you should be seeing on your interface after startup, shown with both ip and ifconfig output. (Note that the ip tools is preferred as ifconfig is effectively deprecated in modern Linux systems)

$ ip addr show dev tun0
6: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100
    link/[65534]
    inet 10.1.8.129/25 brd 10.1.8.255 scope global tun0
$ ifconfig tun0
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.1.8.129  P-t-P:10.1.8.129  Mask:255.255.255.128
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1

Here's the configuration I'm using:

dev tun
verb 4
topology subnet
server 10.1.8.128 255.255.255.128
# FIXME: add your ca, key, cert, and dh directives

Can you verify that same setup works properly? Also, please note that CentOS 6.2 is deprecated and not supported upstream. 6.4 is the current (and only) supported release in the CentOS6 series.

If you still have issues, please post the full log output at 'verb 4' and attach it to this ticket for further analysis.

--
Josh

comment:2 Changed 7 years ago by JoshC

Resolution: worksforme
Status: newclosed

Given no reply in over a month on this issue, it's being marked resolved. If you need to re-open the bug, please check the information supplied earlier in the ticket and include the requested logs in a follow-up.

--
Josh

Note: See TracTickets for help on using tickets.