# OpenVPN FreeBSD ProxyARP



## lamacont (Jan 25, 2014)

Hi all,
I am translating book "Keijser Jan Just - OpenVPN.2.Cookbook" to our language.

For that I wanted test OpenVPN Proxy ARP future with FreeBSD. There is have config file with name example2-10-server.conf. I will show content below.


```
proto udp
port 1194
#dev tun
dev tap
server 192.168.200.0 255.255.255.0

ca /usr/local/etc/openvpn/ca.crt
cert /usr/local/etc/openvpn/openvpnserver.crt
key /usr/local/etc/openvpn/openvpnserver.key
dh /usr/local/etc/openvpn/dh2048.pem
tls-auth /usr/local/etc/openvpn/ta.key 0

persist-key
persist-tun
keepalive 10 60

push "route 10.198.0.0 255.255.0.0"
topology subnet

user root
#user nobody
group wheel
#group nobody

daemon
log-append /var/log/openvpn.log
#verb 7

script-security 2
client-connect /usr/local/etc/openvpn/proxyarp-connect.sh
client-disconnect /usr/local/etc/openvpn/proxyarp-disconnect.sh
```


Config file for /usr/local/etc/openvpn/proxyarp-connect.sh file.

```
#!/usr/local/bin/bash
/usr/sbin/arp -s $ifconfig_pool_remote_ip auto pub only
```

and for /usr/local/etc/openvpn/proxyarp-disconnect.sh

```
#!/usr/local/bin/bash
/usr/sbin/arp -d $ifconfig_pool_remote_ip
```


For FreeBSD machine I already activated ProxyARP feature for all intefaces with command

```
sysctl net.link.ether.inet.proxyall=1
```

But when client try to connect OpenVPN FreeBSD machine in log file I can see the line:
Sat Jan 25 22:29:57 2014 openvpnclient2/3.3.3.10:49168 MULTI_sva: pool returned IPv4=192.168.200.2, IPv6=(Not enabled)
no interface found for 192.168.200.2
Sat Jan 25 22:29:57 2014 openvpnclient2/3.3.3.10:49168 WARNING: Failed running command (--client-connect): external program exited with error status: 1

How I understand OpenVPN variable from script found client IP adres 192.168.200.2. But why it is not working?



Thank you for answers.


----------

