LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   OpenVPN bridge problem (http://www.linuxquestions.org/questions/linux-networking-3/openvpn-bridge-problem-554845/)

acetone802000 05-18-2007 02:46 AM

[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

Nathanael 05-18-2007 03:52 AM

you have ip forwarding enabled?

acetone802000 05-18-2007 04:31 AM

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.


All times are GMT -5. The time now is 11:33 AM.