Hi all
We have two different networks, which I try to connect through OpenVPN.
Network1:
10.200.1.0/24
OpenVPN server: 10.200.1.95
Network2:
192.168.100.0/24
OpenVPN server: 192.168.100.100
I want to be able to access with all computers from network1 the network2.
OpenVPN server: 192.168.100.100:
server.conf:
cd /etc/openvpn
dev tun1
port 1195
proto udp
tun-mtu 1500
fragment 1300
mssfix
mode server
server 10.0.0.0 255.255.255.0
connect-freq 1 sec
;ifconfig-pool-persist ipp.txt
route 10.200.1.0 255.255.255.0
client-config-dir ccd
push "route 192.168.100.0 255.255.255.0"
tls-server
auth SHA1
cipher AES-256-CBC
ca ca.crt
cert vd-vpn.crt
key vd-vpn.key
dh dh1024.pem
comp-lzo yes
verb 3
log /etc/openvpn/debug.log
ccd/openvpn server from network1
iroute 10.200.1.0 255.255.255.0
OpenVPN server: 10.200.1.95:
client.conf:
cd /etc/openvpn
remote dns_name
dev tun1
port 1195
proto udp
tun-mtu 1500
fragment 1300
mssfix
tls-client
pull
auth SHA1
cipher AES-256-CBC
ca ca.crt
cert openvpn.crt
key openvpn.key
comp-lzo yes
verb 3
log /etc/openvpn/debug.log
The connection with this two server seems to work. In the debug.log is no error.
Now I added on my computer(is in network1) this route manually:
route add 192.168.100.0 mask 255.255.255.0 10.200.1.95
On the OpenVPN server 10.200.1.95 I added the following iptables statement:
iptables -A FORWARD -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE
If I run a tracert from my computer I get this:
C:\Users\js>tracert 192.168.100.11
Routenverfolgung zu 192.168.100.11 über maximal 30 Abschnitte
1 <1 ms <1 ms <1 ms 10.200.1.95
2 30 ms 29 ms 30 ms 10.0.0.1
3 * * * Zeitüberschreitung der Anforderung.
I need to do something more on the OpenVPN server 192.168.100.100 but I have no clou what I have to do.
Can someone help me?
Thanks a lot and kind regards
jompsi