OpenvpnLAN-LAN problems, please help me

Source: Internet
Author: User
For openvpnLAN-LAN problems, please help me-Linux Enterprise Application-Linux server application information. The following is a detailed description. I want to set up a LAN-to-LAN openVPN
Offiec
Eth0 219.129.115.55
Eth1 10.9.40.150/16

Home
Eth0 219.129.115.66
Eth1 10.9.40.140/16

The configuration of the static-office.conf file is as follows:

Dev tun
Ifconfig 10.9.40.150 10.9.40.140
Up./office. up
Secret/etc/openvpn/static. key
. Port 5000
; User nobody
; Group nobody
; Comp-lzo
; Ping 15
; Ping 15
; Ping-restart 45
; Ping-timer-rem
; Persist-tun
; Persist-key
Verb 3

The configuration of office. up is as follows:
#! /Bin/sh
Route add-net 10.9.0.0 netmask 255.255.0.0 gw $5

The configuration of firewall. sh is as follows (you only want to test it first, and then perform security restrictions later)
PRIVATE = 10.9.0.0/16
Iptables-a input-j ACCEPT
Iptables-a output-j ACCEPT
Iptables-a forward-j ACCEPT
Iptables-t nat-a postrouting-s $ PRIVATE-o eth0-j MASQUERADE
I don't understand the above Configuration:
One route add-net 10.9.0.0 netmask route 0.0 gw $5
What does $5 mean and represent?
2. For the gateway of eth1 Intranet ip10.9.40.140 and 10.9.40.150, you should specify the ip address
3. Can the office intranet ip address be in the same network segment as the home Intranet ip address, for example, 10.9.0.0/16?

I'm running the openvpn -- config static-office.conf on the office host
Successful connection after the openvpn -- config static-home.conf is executed on the home host

You can ping 10.9.40.150 on the home host, but not other hosts on the same Intranet of the office host, such as 10.9.40.10.
You can ping 10.9.40.140 on the office host, but cannot ping other hosts on the same Intranet of the home host, such as 10.9.40.50.

If the Intranet ip address of home is 10.9.40.141, ping 10.9.40.140 before vpn connection.
However, after the vpn connection, the Intranet ip address of home is 10.9.40.141 ping failure 10.9.40.140.
For the above questions, please help me to see how to configure them. Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.