Hello
I need some Help, don't find anything in the forum or the wiki.
We are a small Business in horticulture.
We plan to connect our main-facility with a new filiale.
Because our main facility is connected via Mobile-LTE, there is a Problem to do this via Fritz!Box or something like this.
Now we have leased an openVPN - Gateway Server from a commercial Provider.
In each Net we have connected one PC to this Server with openVPN in Client-mode.
This runs without Problem, each Pc reaches the other one, i can also get the resources of the other PC.
But we must connect the complete LANs. there a different Databases and Frontends all over the 2 Private LANs.
I tried it, but i don't reach it with the correct routing.
Config
System: Win7
LAN1: 192.168.2.0, NAT-Router: 192.168.2.1, openVPN-client 192.168.2.60
LAN2: 192.168.3.0, NAT-Router: 192.168.3.1, openVPN-client 192.168.3.21
openVPN: 192.168.4.0/22 (Metric 22 standard at this Provider, not nessecary), openvpn-client in LAN1: 192.168.4.49
openVPN-client in LAN2: 192.168.4.50, Openvpn-Gateway 192.168.4.1
IP-forwarding enabled and firewall edited in both client-machines. the connection from client to client is running flawlessly
Gateway-Provider: Portunity.de
sample Client-Config-file, comes from the Provider:
client
dev tun
proto udp
tun-mtu 1440
fragment 1400
mssfix
remote 46.41.x.xx 1194
auth-retry interact
resolv-retry infinite
nobind
persist-key
persist-tun
ca 103xxx/ca.crt
tls-auth 103xxx/ta.key 1
ns-cert-type server
# Debug Level
#verb 6
tun-ipv6
# Bitte editieren Sie die Datei "/etc/openvpn/portunity.login" an und passen
# Ihre Benutzernamen und Ihre Passwort an
# Bitte beachten Sie das nicht in allen OpenVPN Paketen die Möglichkeit einkompiliert ist
# die Zugangsdaten aus einer separaten Datei zu lesen dann kommentieren Sie die folgenden
# Zeilen bitte um
## Zugangsdaten abfragen und nicht aus einer Datei lesen
# auth-user-pass
## Zugangsdaten aus einer Datei lesen
auth-user-pass vpn103xxx.login
# Den Tunnel als Default Gateway nutzen! Wenn Sie dies nicht möchten
# dann kommentieren oder löschen Sie folgende Zeile!
# Eine Alternative dazu ist unter Linux PBR Policy Based Routing.
# Zu finden in unserem WIKI unter folgendem Link:
# http://www.portunity.de/access/wiki/PBR_%28Policy_Based_Routing%29
#redirect-gateway
# Den Tunnel nach dem aufbau alle Rechte entziehen (Nicht bei Windows möglich)
# Bitte beachten Sie das es die Gruppe "nogroup" auf anderen Distributionen
# auch "nobody" heisen kann. Dann bitte einfach die Kommentare ändern!
#user nobody
#group nobody
#group nogroup
# Routen
route 192.168.4.0 255.255.255.0
# Wenn Sie Ihren kompletten Traffic routen möchten, kommentieren Sie die nächste Zeile aus
#route-ipv6 ::0/0
I tried route .. and push "route..." in the config-file and static ipV4 Routes in the NAT-Router and much more...., but.... im not though enough.
Please try to explain what is doing what
Sorry for the poor english,
Bernd