Debian: OpenVPN console vs OpenVPN Network Manager

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
User avatar
GbMax78
OpenVPN User
Posts: 20
Joined: Sun Aug 14, 2011 6:21 am
Location: Italy
Contact:

Debian: OpenVPN console vs OpenVPN Network Manager

Post by GbMax78 » Sun Dec 15, 2013 8:38 pm

Hi at all! :)

I have a OpenVPN server on my Debian Wheezy where I add this iptables:

Code: Select all

iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
On Debian client I have different routing.
OpenVPN by console:

Code: Select all

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 wlan0
0.0.0.0         0.0.0.0         0.0.0.0         U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0
OpenVPN by Network Manager:

Code: Select all

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.8.0.5        0.0.0.0         UG        0 0          0 tun0
0.0.0.0         0.0.0.0         0.0.0.0         U         0 0          0 eth0
10.8.0.0        10.8.0.5        255.255.255.0   UG        0 0          0 tun0
10.8.0.5        0.0.0.0         255.255.255.255 UH        0 0          0 tun0
87.21.XX.X      192.168.1.1     255.255.255.255 UGH       0 0          0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
192.168.1.0     10.8.0.5        255.255.255.0   UG        0 0          0 tun0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0
In the first case internet doesn't work, in the second it works but I have wan server ip, I'd like to use internet with client wan ip (defcon1 is disabled on the server), there is a nice guide here http://allanmcrae.com/2013/09/routing-t ... h-openvpn/ but I didn't understand how I can modify for me!

GbMax78

Post Reply