Hey guys! 🙂
I'm new to openvpn and tryingt it out. I build up two networks in virtual box.
Network 1:
Ubuntu server (name ZWall) 12.04:
eth0 bridged 192.168.0.113/24
eth1 host only 192.168.56.254/24 #bridged to my physical NIC
win2008r2 server
IP: 192.168.56.10/24
GW: eth1 from network 1
DNS: itself
win7 client1 (ZClient):
IP: 192.168.56.20/24
GW: eth1 of ubuntu server
DNS: r2 server
On the Windows 2008R2 runs DNS, DHCP, AD and I made a domain which the client from network 1 joined. Per DHCP I provided teh IP with DNS and GW for the client.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Network 2:
Ubuntu server 12.04:
eth0 bridged 192.168.0.213/24
eth1 host only 192.168.32.254/24 #bridged to my physical NIC
win7 client2 (FClient):
IP: 192.168.32.20
GW: eth1 from network 2
The ubuntu servers are my firewalls, but they accept everything just for testing. I wrote a little fw script on both with just one command:
iptables –t nat –A POSTROUTING –o eth0 –j MASQUERADE
I enabled IP forwarding.
I have not activated tun forwarding because the firewall accepts everything anyway.
Here's the problem:
I built a connection between my ubuntu server (ZWall) from network 1 to the client (FClient) in network 2 with a tun adapter. That works just fine.
But now I want the FClient to join the domain that runs on the DC in network 1. I tried it with making a ccd directory and iroute and edited the server config on the server.
Here's my configs so far: (I added the red ones to reach my 192.168.56.0 subnet, since then my VPN doesnt start anymore)
server config:
port 1194
proto udp
dev tun
ca ./easy-rsa2/keys/ca.crt
cert ./easy-rsa2/keys/ZWall.crt
key ./easy-rsa2/keys/ZWall.key
dh ./easy-rsa2/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
[color=#FF0000]push "route 192.168.0.0 255.255.255.0"[/color]
[color=#FF0000]client-config-dir ccd
route 192.168.0.0 255.255.255.0[/color]
keepalive 10 120
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
ccd file named FClient, like the client and the certificates. I did this simply with nano
iroute 192.168.0.0 255.255.255.0
Sooo that's all I did, but I just cant reach the DC from the Client2 with a ping. Also the VPN connection won't work since I added the red lines.
I also tried it with some postrouting commands in my firewall script, but it didnt work. I also tried to push route 192.168.56.0 (which is the subnet I want to reach) and changed all red lines to that or added two push notes with 192.168.0.0 and 192.168.56.0 and changed everything to that but that didnt work too.
Please help me with that, I tried hours to manage it, but it won't work. Thanks for your help!