Page 1 of 1

Problem with shares

Posted: Wed Dec 07, 2011 6:49 pm
by kfadrat
Hello,
I poor in this task, so sorry for stupid questions.

I have configured openvpn on Linksys - OpenWrt, everything worked fine and suddenly ....
I restarted router and start openvpn deamon. On the client side I have openvpn connection

Wed Dec 07 19:16:12 2011 LZO compression initialized
Wed Dec 07 19:16:12 2011 Socket Buffers: R=[8192->8192] S=[8192->8192]
Wed Dec 07 19:16:12 2011 ROUTE default_gateway=192.168.80.80
Wed Dec 07 19:16:15 2011 RESOLVE: Cannot resolve host address: add: [HOST_NOT_FOUND] The specified host is unknown.
Wed Dec 07 19:16:15 2011 OpenVPN ROUTE: failed to parse/resolve route for host/network: add
Wed Dec 07 19:16:15 2011 TAP-WIN32 device [Połączenie lokalne 4] opened: \\.\Global\{74F3F28C-29C0-4A8F-AD62-2AB3573A4168}.tap
Wed Dec 07 19:16:15 2011 TAP-Win32 Driver Version 9.8
Wed Dec 07 19:16:15 2011 TAP-Win32 MTU=1500
Wed Dec 07 19:16:15 2011 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.3.0.2/255.255.255.252 on interface {74F3F28C-29C0-4A8F-AD62-2AB3573A4168} [DHCP-serv: 10.3.0.1, lease-time: 31536000]
Wed Dec 07 19:16:15 2011 Successful ARP Flush on interface [32] {74F3F28C-29C0-4A8F-AD62-2AB3573A4168}
Wed Dec 07 19:16:15 2011 Data Channel MTU parms [ L:1545 D:1450 EF:45 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Dec 07 19:16:15 2011 Local Options hash (VER=V4): 'd854e6f5'
Wed Dec 07 19:16:15 2011 Expected Remote Options hash (VER=V4): '709b0f88'
Wed Dec 07 19:16:15 2011 UDPv4 link local (bound): [undef]:1194
Wed Dec 07 19:16:15 2011 UDPv4 link remote: ---.---.---.---:1194
Wed Dec 07 19:16:25 2011 Peer Connection Initiated with ---.---.---.---:1194
Wed Dec 07 19:16:31 2011 TEST ROUTES: 0/0 succeeded len=0 ret=1 a=0 u/d=up
Wed Dec 07 19:16:31 2011 Initialization Sequence Completed
I can ping the server 10.3.0.1, but I have problems with shares in destination network. What could I check to solve the problem. I have the simplest configuration:

server:
dev tun
tun-mtu 1500
# ifconfig local_ip remote_ip
ifconfig 10.3.0.1 10.3.0.2
; port 5000
user nobody
group nobody
comp-lzo

; ping 15
; ping-restart 45
; ping-timer-rem
; persist-tun
; persist-key

verb 3
secret /etc/openvpn/static.key
; eof
and client:
dev tun
tun-mtu 1500
remote ---.---.---.---
# ifconfig local_ip remote_ip
route add 192.168.1.0 mask 255.255.255.0 10.3.0.1

ifconfig 10.3.0.2 10.3.0.1
; port 5000
user nobody
group nobody
comp-lzo

; ping 15
; ping-restart 45
; ping-timer-rem
; persist-tun
; persist-key

verb 3
secret static.key
; eof

I will be gratefull for suggestions and help


jack

Re: Problem with shares

Posted: Thu Dec 08, 2011 8:21 am
by janjust
I can ping the server 10.3.0.1, but I have problems with shares in destination network.
can you ping a host on the server-side LAN (e.g. 192.168.1.1) ? does the server-side LAN know that all traffic coming from 10.3.0.2 needs to go back to 10.3.0.1 instead of to the default GW? Is routing enabled on the server?

what does 'problems with shares' mean? what happens if you start

Code: Select all

start \\10.3.0.1
start \\192.168.1.x
?

Re: Problem with shares

Posted: Thu Dec 08, 2011 5:49 pm
by kfadrat
Hi,

I mean that I can ping router on the server-side. I cannot ping computer on ther server-side LAN. When I send command tracert, the packets stoped on router on the server-side LAN. router adress on the server-side lan is 192.168.1.1


from the client side:
C:\Documents and Settings\szczurowscy>tracert 192.168.1.10

Trasa śledzenia do 192.168.1.10 przewyższa maksymalną liczbę przeskoków 30

1 30 ms 49 ms 36 ms 10.3.0.1
2 * * * Upłynął limit czasu żądania.
3 *

Re: Problem with shares

Posted: Fri Dec 09, 2011 10:04 am
by Mimiko
On the server-side lan, the client's has the default router to 192.168.1.1 and therefore, all the answers for VPN clients are send to the default router, not to the OpenVPN server. So, in order for routing to work you have to add on every host of server-side lan the route:

Code: Select all

route add 10.3.0.0 mask 255.255.255.0 gw <OpenVPN server lan IP>

Re: Problem with shares

Posted: Fri Dec 09, 2011 11:11 am
by kfadrat
On the client side I add route liike this:
route add 192.168.1.0 mask 255.255.255.0 10.3.0.1
and it doesn't work.

Re: Problem with shares

Posted: Fri Dec 09, 2011 1:41 pm
by Mimiko
Please read my previous post carefully.

Re: Problem with shares

Posted: Fri Dec 09, 2011 10:14 pm
by kfadrat
hi,

I added route
route add 10.3.0.0 mask 255.255.255.0 192.168.1.1
but it won't help.


Maybe earlierI wrote something wrong.
router: linksys with openWRT
local address of router: 192.168.1.1
address of file serwer is 192.168.1.10

route table on client:
C:\Documents and Settings\szczurowscy>route print
===========================================================================
Lista interfejsów
0x1 ........................... MS TCP Loopback interface
0x2 ...00 30 05 8c 4e 41 ...... Karta Ethernet ADMtek oparta na AN983 - Sterown
k miniport Harmonogramu pakietˇw
0x3 ...00 ff b2 d1 0e e5 ...... TAP-Win32 Adapter V9 #2 - Sterownik miniport Ha
monogramu pakietˇw
0x4 ...00 ff 4e 51 8d eb ...... TAP-Win32 Adapter V9 - Sterownik miniport Harmo
ogramu pakietˇw
0x20006 ...00 1d 7e 94 78 0d ...... Compact Wireless-G USB Adapter #3 - Sterown
k miniport Harmonogramu pakietˇw
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric

0.0.0.0 0.0.0.0 192.168.10.1 192.168.10.106 30
10.3.0.0 255.255.255.252 10.3.0.2 10.3.0.2 30
10.3.0.2 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.3.0.2 10.3.0.2 30
91.199.22.122 255.255.255.255 192.168.10.1 192.168.10.106 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 10.3.0.1 10.3.0.2 1
192.168.10.0 255.255.255.0 192.168.10.106 192.168.10.106 30
192.168.10.106 255.255.255.255 127.0.0.1 127.0.0.1 30
192.168.10.255 255.255.255.255 192.168.10.106 192.168.10.106 30
224.0.0.0 240.0.0.0 10.3.0.2 10.3.0.2 30
224.0.0.0 240.0.0.0 192.168.10.106 192.168.10.106 30
255.255.255.255 255.255.255.255 10.3.0.2 10.3.0.2 1
255.255.255.255 255.255.255.255 192.168.10.106 192.168.10.106 1
255.255.255.255 255.255.255.255 192.168.10.106 2 1
255.255.255.255 255.255.255.255 192.168.10.106 3 1
Domyślna brama: 192.168.10.1.
===========================================================================
Trasy trwałe:
Brak
route table of the file server on server-side LAN
C:\Documents and Settings\Administrator>route print

IPv4 Route Table
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x10003 ...00 1b 78 92 ae 20 ...... HP NC373i Multifunction Gigabit Server Adapt
er
0x10004 ...00 1b 78 92 ae 22 ...... HP NC373i Multifunction Gigabit Server Adapt
er #2
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.10 20
10.3.0.0 255.255.255.0 192.168.1.1 192.168.1.10 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
169.254.0.0 255.255.0.0 169.254.29.228 169.254.29.228 10
169.254.29.228 255.255.255.255 127.0.0.1 127.0.0.1 10
169.254.255.255 255.255.255.255 169.254.29.228 169.254.29.228 10
192.168.1.0 255.255.255.0 192.168.1.10 192.168.1.10 20
192.168.1.10 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.1.255 255.255.255.255 192.168.1.10 192.168.1.10 20
213.161.99.0 255.255.255.0 213.161.99.99 192.168.1.10 20
213.161.99.99 255.255.255.255 127.0.0.1 127.0.0.1 20
213.161.99.255 255.255.255.255 213.161.99.99 192.168.1.10 20
224.0.0.0 240.0.0.0 169.254.29.228 169.254.29.228 10
224.0.0.0 240.0.0.0 192.168.1.10 192.168.1.10 20
255.255.255.255 255.255.255.255 169.254.29.228 169.254.29.228 1
255.255.255.255 255.255.255.255 192.168.1.10 192.168.1.10 1
Default Gateway: 192.168.1.1
===========================================================================
Persistent Routes:
None
and finaly route table on router - where are configured openvpn
root@OpenWrt:/etc# route -e
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.3.0.2 * 255.255.255.255 UH 0 0 0 tun0
217.67.212.56 * 255.255.255.248 U 0 0 0 vlan1
192.168.1.0 * 255.255.255.0 U 0 0 0 br0
default 217-67-212-57.i 0.0.0.0 UG 0 0 0 vlan1

Re: Problem with shares

Posted: Sat Dec 10, 2011 9:00 am
by Mimiko
It's very bad that you don't read the words carefully and don't whant to understan.
What is the ips of the OpenVPN server?

Re: Problem with shares

Posted: Sat Dec 10, 2011 3:27 pm
by kfadrat
Like I said in the first post sorry for stupid questions. I am really pure in this case.

Ip of my openvpn server is 192.168.1.1. router and openvpn server it is the same machine. Linksys with openwrt

Re: Problem with shares

Posted: Sat Dec 10, 2011 3:47 pm
by Mimiko
What will be the answer if you ping the file server from the router itself? Did you checked the iptables on router? Give a list from "iptables -L -v".

Re: Problem with shares

Posted: Sat Dec 10, 2011 3:55 pm
by kfadrat
HI
I solved the problem. The problem was forward, like you wrote in your last post.

Thanks for help

Re: Problem with shares

Posted: Sat Dec 10, 2011 4:06 pm
by Mimiko
Hm, isn't on routers the forwarding is enabled by default?