[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

[Openvpn-users] OpenVPN Linux <-> Windows Behind firewall Ethernet Bridging


  • Subject: [Openvpn-users] OpenVPN Linux <-> Windows Behind firewall Ethernet Bridging
  • From: "Fred Yip" <fredyip123@xxxxxxxxxxx>
  • Date: Tue, 9 Dec 2003 15:10:53 +0800

                                MAIN OFFICE

  REDHAT9
  OPENVPN 1.5.0                                          LINKSYS ROUTER
+---------------+
| Linux (IPMasq)|eth0(192.168.0.254) -[HUB]-
[192.168.0.1-ADSL-PUBLIC_ADDR-A] ---<<INET>>
+---------------+                                     | |
|
eth1(192.168.0.200)                              | |
|
 |------------------------------------------------| |
|

[]-[]-[]-[]-[]-[]                                                   |
                                                              network pc's
|

|

|

|
                                       BRANCH OFFICE
|
+----------------+
|
| Windows XP
|eth0(192.168.0.60)---[HUB]---[192.168.0.50-ADSL-PUBLIC_ADDR-A] -------+
+----------------+                                    |
                                                            |
                                                            |
                                                             []-[]-[]-[]-[]
                                                                network pc's
Background Information
---------------------------------
1 Main Office       -    [ 1 Linux Server as OPENVPN Server]
                                Linux Server - eth0, eth1
1 Branch Office    -    [ 1 WindowsXP as OPENVPN Client]
                                Windows XP - eth0
The Linksys Router at the Main Office has port fowarding port 5000 to the
LINUX Server(192.168.0.254).

1) I am having a problem bridging the 2 lan together. So that the computers
on Branch office and Main office can communicate to each other as if they
were on the same LAN. (All on 192.168.0.0 /24 Network)

2) First of all, Do I really need 2 ethernet adapter on the linux server
(similar to the branch office winxp pc?

3) I can connect the 2 OPENVPN Client / Server together with no problem. It
says Peer Connection Initiated. =)
Now I guess the problem is not openvpn but it's the ethernet bridging
settings.

4) I applied this settings ethernet briding settings:

#!/bin/bash

modprobe tun
modprobe bridge

openvpn --mktun --dev tap0

brctl addbr br0
brctl addif br0 eth1
brctl addif br0 tap0

ifconfig tap0 0.0.0.0 promisc up
ifconfig eth1 0.0.0.0 promisc up

ifconfig br0 192.168.0.200 netmask 255.255.255.0 broadcast 192.168.1.255

# end of script


5) Linux Settings
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.0.0     *               255.255.255.0   U     0      0        0
br0
192.168.0.0     *               255.255.255.0   U     0      0        0
eth0
127.0.0.0         *               255.0.0.0       U       0       0        0
lo
default         192.168.0.1     0.0.0.0         UG     0       0         0
eth0


If I'm correct, it means that if the linux server pings to 192.168.0.5 for
example, it will try to send packets through eth0 and br0? is that right??




Windows Setting
-----------------------------
############################################
# OpenVPN bridge config, windows client side

remote [Public IP Address]   <------------- Which will be forward to
Internal Address 192.168.0.254
port 8887
dev tap

# This is the address the client will
# "appear as" when it connects to the
# bridged LAN.
ifconfig 192.168.1.3 255.255.255.0
ifconfig-nowarn

secret key.txt
ping 10
;comp-lzo
verb 3

# end of config



LINUX SETTING
-------------------------
###################################
# OpenVPN bridge config, Linux side

local 192.168.0.254

# IP settings
port 8887
dev tap0

# crypto config
secret /etc/openvpn/static.key

# restart control
persist-key
persist-tun
ping-timer-rem
ping-restart 60
ping 10


# compression
;comp-lzo

# UID
user nobody
group nobody

# verbosity
verb 3

# end of config
###################################



I still can't talk.. what's wrong??  I tried ROUTING BEFORE with 2 subnet
192.168.0.0/24 and 192.168.1.0/24
and it seems to work because ROUTE TABLE will know where to route opposite
traffic.

But BRIDGING wont' work...

Can anyone help??

Thanks in advance




____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users


Warning: require_once(../../../archive_common.php) [function.require-once]: failed to open stream: No such file or directory in /home/openvpn/domains/openvpn.net/public_html/archive/openvpn-users/2003-12/msg00051.html on line 343

Fatal error: require_once() [function.require]: Failed opening required '../../../archive_common.php' (include_path='/usr/local/lib/php') in /home/openvpn/domains/openvpn.net/public_html/archive/openvpn-users/2003-12/msg00051.html on line 343