LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 05-18-2007, 02:46 AM   #1
acetone802000
LQ Newbie
 
Registered: Sep 2003
Location: France / Amiens
Distribution: Debian Etch
Posts: 14

Rep: Reputation: 0
[Resolved] OpenVPN bridge problem


I have an problem with my OpenVPN bridge configuration !!!

My server is unreachable with the bridge (Apache, ftp and if i ping with my server y have "network unreachable" )

i have an router with an ip 192.168.1.1

the file interfaces:
Quote:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.20
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1

bridge-start:
Quote:
#!/bin/bash

#################################
# Set up Ethernet bridge on Linux
# Requires: bridge-utils
#################################

# Define Bridge Interface
br="br0"

# Define list of TAP interfaces to be bridged,
# for example tap="tap0 tap1 tap2".
tap="tap0"

# Define physical ethernet interface to be bridged
# with TAP interface(s) above.
eth="eth0"
eth_ip="192.168.1.20"
eth_netmask="255.255.255.0"
eth_broadcast="192.168.1.255"

for t in $tap; do
openvpn --mktun --dev $t
done

brctl addbr $br
brctl addif $br $eth

for t in $tap; do
brctl addif $br $t
done

for t in $tap; do
ifconfig $t 0.0.0.0 promisc up
done

ifconfig $eth 0.0.0.0 promisc up

ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast

server.conf
Quote:
port 1194
proto udp
dev tap0
ca ca.crt
cert DebianServer.crt
key DebianServer.key
dh dh1024.pem

ifconfig-pool-persist ipp.txt
tls-auth ta.key 0

server-bridge 192.168.1.20 255.255.255.0 192.168.1.128 192.168.1.254

keepalive 10 120
comp-lzo
user openvpn
persist-key
persist-tun
chroot /var/log/openvpn
status /var/log/openvpn/status.log
log-append /var/log/openvpn/openvpn.log
verb 4
mute 10

ifconfig:
Quote:
br0 Lien encap:Ethernet HWaddr 00:04:__:__:__:__
inet adr:192.168.1.20 Bcast:192.168.1.255 Masque:255.255.255.0
adr inet6: fe80::204:75ff:fed8:6afe/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:169 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:35289 (34.4 KiB) TX bytes:5237 (5.1 KiB)

eth0 Lien encap:Ethernet HWaddr 00:__:__:__:__:__
adr inet6: fe80::204:75ff:fed8:6afe/64 Scope:Lien
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:5150 errors:0 dropped:0 overruns:0 frame:0
TX packets:842 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:715269 (698.5 KiB) TX bytes:113740 (111.0 KiB)
Interruption:169 Adresse de base:0xc000

lo Lien encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:714 errors:0 dropped:0 overruns:0 frame:0
TX packets:714 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:196786 (192.1 KiB) TX bytes:196786 (192.1 KiB)

tap0 Lien encap:Ethernet HWaddr 46:__:__:__:__:__
adr inet6: fe80::44f8:15ff:fe0f:f0f/64 Scope:Lien
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:115 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

debian:/home/francois# netstat -nr
Quote:
Table de routage IP du noyau
Destination Passerelle Genmask Indic MSS Fenêtre irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br0

Last edited by acetone802000; 05-18-2007 at 12:11 PM.
 
Old 05-18-2007, 03:52 AM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
you have ip forwarding enabled?
 
Old 05-18-2007, 04:31 AM   #3
acetone802000
LQ Newbie
 
Registered: Sep 2003
Location: France / Amiens
Distribution: Debian Etch
Posts: 14

Original Poster
Rep: Reputation: 0
Yes the ip forwarding is enabled, when i make an:
cat /proc/sys/net/ipv4/ip_forward
I obtain 1

edit: I found the problem. I forgot the gateway in the bridge-start file.

Last edited by acetone802000; 05-18-2007 at 12:11 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenVPN client has not default gateway when connect to OpenVPN server sailershen Linux - Security 3 03-04-2010 02:20 AM
LXer: Lintrack As A LAN Gateway And An OpenVPN Bridge LXer Syndicated Linux News 0 05-11-2007 02:01 PM
OpenVPN Question : connecting 5-6 comps with OpenVPN duryodhan Linux - Networking 7 02-15-2007 10:28 PM
LXer: How to bridge networks with OpenVPN LXer Syndicated Linux News 0 11-22-2006 04:03 AM
Openvpn problem kingisthebest Linux - Networking 1 03-07-2006 05:23 AM


All times are GMT -5. The time now is 08:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration