Routing Problem

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
khaledhu
OpenVpn Newbie
Posts: 1
Joined: Sun Jan 08, 2012 2:35 pm

Routing Problem

Post by khaledhu » Sun Jan 08, 2012 2:48 pm

I have installed openvpn on my server for the first time and used this configurations

openvpn.conf

local <public IP on server>
port 1723
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
cipher AES-128-CBC
keepalive 10 120
comp-lzo
user nobody
group users
persist-key
persist-tun
verb 6
mute 2
client-to-client
status openvpn-status.log
log-append /var/log/openvpn.log
ifconfig-pool-persist ipp.txt
server 192.168.100.0 255.255.255.0
push "dhcp-option DNS 192.168.1.16"
push "route 192.168.1.0 255.255.255.0"


and I added these rules to iptables

-A INPUT -p udp -m udp --dport 1723 -j ACCEPT
##Allow TUN interface connections to OpenVPN server
-A OUTPUT -o 192.168.1.16 -s <public IP on server> -d 192.168.100.0/24 -j ACCEPT
-A OUTPUT -o tun0 -s <public IP on server> -d 192.168.100.0/24 -j ACCEPT
-A FORWARD -i eth3 -o tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -o eth2 -s <public IP on server> -d 192.168.100.0/24 -j ACCEPT
-A FORWARD -o tun0 -s <public IP on server> -d 192.168.100.1 -j ACCEPT
-A FORWARD -o eth3 -s <public IP on server> -d 192.168.100.0/24 -j ACCEPT
-A FORWARD -o tun0 -s 192.168.1.0/24 -d 192.168.100.0/24 -j ACCEPT


my server has two interface

eth2 : 192.168.1.16
eth3 : <public IP on server>

I can connect to the server and i can ping both tunnel IP and 192.168.1.16 , but when i try to ping another server inside my LAN like 192.168.1.5 it give me timedout , I tried to add manual route on 192.168.1.5 to 192.168.100.0 network but did not work

please advice

Thanks

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Routing Problem

Post by maikcat » Mon Jan 09, 2012 7:40 am

did you enabled ip forwarding on server?

Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

Post Reply