shaheryar
Hi
I have made the setup of openvpn up and running but i am enable to connect with my home DHCP network
here is the architecture of my network
i have a dsl modem connected with wifi router of tplink both are in dhcp and connected to my desktop which has windows 7 i have another Laptop in which ubuntu 11.04 natty is installed with an static ip 192.168.2.10 which act as a vpn server
DSL Modem Info
IP : 192.168.1.2 (it is in DHCP configuration)
Mask : 255.255.255.0
default gateway: 192.168.1.1 (internet connection on this IP)
DNS primary: 203.99.163.240
DNS Secodary: 8.8.8.8
TPlink Wifi router
IP : 192.168.2.2 (it is in DHCP configuration)
Mask : 255.255.255.0
default gateway: 192.168.2.2
DNS primary: 203.99.163.240
DNS Secodary: 8.8.8.8
Routing Table information
ID Destination Network Subnet Mask Gateway Interface
1 192.168.2.0 255.255.255.0 0.0.0.0 LAN & WLAN
2 192.168.1.0 255.255.255.0 0.0.0.0 WAN
3 239.0.0.0 255.0.0.0 0.0.0.0 LAN & WLAN
4 0.0.0.0 0.0.0.0 192.168.1.1 WAN
Ifconfig output
eth0 Link encap:Ethernet HWaddr 00:1e:ec:81:b3:f3
inet addr:192.168.2.10 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::21e:ecff:fe81:b3f3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:828 errors:0 dropped:0 overruns:0 frame:0
TX packets:298 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:92100 (92.1 KB) TX bytes:39881 (39.8 KB)
Interrupt:16 Base address:0x1000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2786 errors:0 dropped:0 overruns:0 frame:0
TX packets:2786 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:216970 (216.9 KB) TX bytes:216970 (216.9 KB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.255.1 P-t-P:192.168.255.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 00:22:68:98:e0:02
inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::222:68ff:fe98:e002/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16138 errors:0 dropped:0 overruns:0 frame:0
TX packets:7071 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4264559 (4.2 MB) TX bytes:1170738 (1.1 MB)
openvpn Server configuration file:
dev tun
port 6999
proto udp
ca keys/ca.crt
cert keys/server.crt
key keys/server.key #secret file
dh keys/dh1024.pem
server 192.168.255.0 255.255.255.0
push “route 192.168.2.0 255.255.255.0”
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
verb 3
mute 20
Client Configuration file for windows openvpn
dev tun
port 6999
proto udp
remote 192.168.2.10
ifconfig 192.168.255.2 192.168.255.1
ca ca.crt
cert client1.crt
key client1.key
tls-client
keepalive 10 20
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
verb 3
please help me out
maikcat
hi there,
you are using server mode onto your openvpn server side,
that means that server assings ip automatically to your clients,
so remove this from your client
>ifconfig 192.168.255.2 192.168.255.1
the first ip that your client vpn interface will be 192.168.255.6.
also i guess that you are testing the config with both server/client in the same lan?
if yes ,pushing routes is bad idea...
test your setup via internet..
also having 2 different nics (lan&wlan) belong to same range is not a good idea...
also you must enable routing on openvpn server to routing to work..
Michael.