# OpenVPN + NAT (auto?)



## a931 (Mar 1, 2012)

Hello, I have a small problem. There is a server with FreeBSD 8.x, on it works OpenVPN. In service OpenVPN options Routing becomes only (A configuration example below).

I didn't adjust NAT for users OpenVPN. BUT it is!

Prompt where to look, what resolves this NAT? Simply to me it needs to be changed a little.

```
[more=FreeBSD server.conf..]
mode server
tls-server
daemon
ifconfig 192.168.10.1 255.255.255.0
port 1194
proto tcp-server
dev tap
ca   /usr/local/etc/openvpn/keys/ca.crt
cert /usr/local/etc/openvpn/keys/server.crt
key  /usr/local/etc/openvpn/keys/server.key
dh   /usr/local/etc/openvpn/keys/dh1024.pem
client-config-dir /usr/local/etc/openvpn/ccd
push "route 192.168.10.0 255.255.255.0 192.168.10.1"
route 10.10.11.0 255.255.255.0 192.168.10.3
route 10.0.0.0  255.0.0.0     10.10.10.47
keepalive 10 120
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-status.log
log /var/log/openvpn.log
verb 5
[/more]

[more=ccd/user_net...]
ifconfig-push 192.168.10.3 255.255.255.0
push "route 10.10.10.0 255.255.255.0 192.168.10.1"
push "route 10.0.0.0 255.0.0.0 192.168.10.1"
[/more]

[more=user_net.conf ubuntu 10.x ...]
port 1194
proto tcp                                
dev tap
ca /etc/openvpn/keys/gate_spb/ca.crt
cert /etc/openvpn/keys/gate_spb/user.net.crt
key /etc/openvpn/keys/gate_spb/user.net.key
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
log-append /var/log/openvpn.log
status /var/log/openvpn-status.log
remote *.*.*.*          
client
resolv-retry infinite
[/more]
```


----------

