Problem with VPNC and Cisco VPN connection....

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
mbobak
DD-WRT Novice


Joined: 22 Feb 2010
Posts: 9

PostPosted: Thu Feb 25, 2010 8:26    Post subject: Problem with VPNC and Cisco VPN connection.... Reply with quote
So, I'm trying to get VPN w/ auto-connect/reconnect working with my employer's Cisco VPN.

That was a miserable failure, so I fell back to the non-autoconnect version, and I'm still having problems.

I grabbed my .pcf file off my laptop, ran pcf2vpnc on it, and got something that looks like this:
Code:
mjb@mars:~$ ./pcf2vpnc ProQuest\ VPN.pcf
decoding input: No such file or directory
## generated by pcf2vpnc
IPSec ID nottherealid
IPSec gateway 127.0.0.1  <---fake IP, the correct one was here
IPSec secret password <---not the real password

Xauth password password <--again, fake
Xauth username mbobak
Domain pq
IKE Authmode psk

So, looking at that, I took the script provided by alain, and modified it, like this:
Code:
#!/bin/sh
vpn_concentrator="127.0.0.1" ##enter ip or hostname of your Ipsec vpn concentrator
vpn_groupname="nottherealid"  ##enter the group name here
vpn_grouppasswd="password"   ##enter the group password here
vpn_username="mbobak"       ##enter your username here
vpn_password="password"        ##enter your password here
vpn_domain="pq"   ##enter your domain
#--do not edit this--
#Written by Alain R. (alainr /A*T/ gmx. de) 27.Sep.2007
vpnc-disconnect
rm -f /tmp/etc/vpnc/vpn.conf
mkdir /tmp/etc/vpnc
echo "
IPSec gateway $vpn_concentrator
IPSec ID $vpn_groupname
IPSec secret $vpn_grouppasswd
Xauth username $vpn_username
Xauth password $vpn_password
Domain $vpn_domain
IKE Authmode psk
" >> /tmp/etc/vpnc/vpn.conf


note that I added the vpn_domain, and the 'Domain $vpn_domain' line and the 'IKE Authmode psk' line.
I save the script under startup, and reboot the router.

Then, I log into the router, and I do:
Code:
vpnc /tmp/etc/vpnc/vpn.conf

and I get:
Code:
Connect Banner:
| VPN access for company_name Associates.
|
| Warning!  You are about to access the private network.  Unauthorized access will be punished to the fullest extent of the law.

root@DD-WRT:~#


Note that I get the banner, indicating communication with and successful connection to, the VPN gateway, correct?

But then it exits back out to command line. This is different than if I run vpnc from the command line on my Ubuntu 9.10 box, using the *same* vpn.conf. If I run it there, I get the same banner, but vpnc does *not* exit back to command line, and my connection is successful.

So, any ideas, thoughts or suggestions would be appreciated.

AdvThanksance,

-Mark

PS Almost forgot, router is Linksys WRT-300N, dd-wrt is:
Firmware: DD-WRT v24-sp2 (10/10/09) vpn
Sponsor
oxygenx
DD-WRT Guru


Joined: 11 Nov 2007
Posts: 566

PostPosted: Thu Feb 25, 2010 13:55    Post subject: Re: Problem with VPNC and Cisco VPN connection.... Reply with quote
mbobak wrote:

But then it exits back out to command line. This is different than if I run vpnc from the command line on my Ubuntu 9.10 box, using the *same* vpn.conf. If I run it there, I get the same banner, but vpnc does *not* exit back to command line, and my connection is successful.

detaching is the usual behaviour.
mbobak
DD-WRT Novice


Joined: 22 Feb 2010
Posts: 9

PostPosted: Fri Feb 26, 2010 5:02    Post subject: Reply with quote
Hmm....ok, thanks...

Any other thoughts, anyone?

-Mark
mbobak
DD-WRT Novice


Joined: 22 Feb 2010
Posts: 9

PostPosted: Fri Feb 26, 2010 12:03    Post subject: Reply with quote
I've tried with and without the 'IKE Authmode psk' line, and it doesn't seem to matter. I always get the banner, leading me to believe that it worked....but then trying to ssh to a machine fails, even if I specify IP.

-Mark
oxygenx
DD-WRT Guru


Joined: 11 Nov 2007
Posts: 566

PostPosted: Fri Feb 26, 2010 12:09    Post subject: Reply with quote
check your route table?
mbobak
DD-WRT Novice


Joined: 22 Feb 2010
Posts: 9

PostPosted: Fri Feb 26, 2010 15:50    Post subject: Reply with quote
It looked ok.

I'll post it when I get home this evening.
mbobak
DD-WRT Novice


Joined: 22 Feb 2010
Posts: 9

PostPosted: Sat Feb 27, 2010 2:09    Post subject: Reply with quote
Ok, so, when I reboot router, *before* running vpnc, I have:
Code:
root@DD-WRT:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
68.41.248.0     0.0.0.0         255.255.252.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 br0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         68.41.248.1     0.0.0.0         UG    0      0        0 eth1


after running vpnc, I get:
Code:
root@DD-WRT:/tmp/etc/vpnc# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
165.215.19.27   68.41.248.1     255.255.255.255 UGH   0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
68.41.248.0     0.0.0.0         255.255.252.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 br0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 tun0



Still struggling here, any thoughts or ideas are appreciated.

-Mark
alain
DD-WRT Guru


Joined: 06 Jun 2006
Posts: 601

PostPosted: Sat Feb 27, 2010 17:12    Post subject: Reply with quote
Getting the welcome banner in general means the tunnel is established. Can you post the output of "ifconfig"?
Can your router access the company network?
To share the connection with the pc's:

After you get the connection banner enter the following:
Code:
iptables -A FORWARD -o tun0 -j ACCEPT
iptables -A FORWARD -i tun0 -j ACCEPT
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE


Greetings,
Alain
mbobak
DD-WRT Novice


Joined: 22 Feb 2010
Posts: 9

PostPosted: Sun Feb 28, 2010 1:05    Post subject: Reply with quote
Ok, *before* running vpnc, ifconfig looks like this:
Code:
root@DD-WRT:~# ifconfig -a
br0       Link encap:Ethernet  HWaddr 00:18:39:EE:46:B6 
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:758 errors:0 dropped:0 overruns:0 frame:0
          TX packets:650 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:99730 (97.3 KiB)  TX bytes:140693 (137.3 KiB)

br0:0     Link encap:Ethernet  HWaddr 00:18:39:EE:46:B6 
          inet addr:169.254.255.1  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 00:18:39:EE:46:B6 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:689 errors:0 dropped:0 overruns:0 frame:0
          TX packets:647 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:103994 (101.5 KiB)  TX bytes:142957 (139.6 KiB)
          Interrupt:4

eth1      Link encap:Ethernet  HWaddr 00:18:39:EE:46:B7 
          inet addr:68.41.248.60  Bcast:68.255.255.255  Mask:255.255.252.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1056 errors:0 dropped:0 overruns:0 frame:0
          TX packets:520 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:131924 (128.8 KiB)  TX bytes:92253 (90.0 KiB)
          Interrupt:5

eth2      Link encap:Ethernet  HWaddr 00:18:39:EE:46:B8 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:2893
          TX packets:14 errors:33 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1406 (1.3 KiB)  TX bytes:2862 (2.7 KiB)
          Interrupt:2 Base address:0x4000

etherip0  Link encap:Ethernet  HWaddr 5E:23:C5:FD:19:8E 
          BROADCAST 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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:406 (406.0 B)  TX bytes:406 (406.0 B)

teql0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          NOARP  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)



After running vpnc, I get:
Code:
root@DD-WRT:/tmp/etc/vpnc# ifconfig -a
br0       Link encap:Ethernet  HWaddr 00:18:39:EE:46:B6 
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3443 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3117 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:514452 (502.3 KiB)  TX bytes:1961955 (1.8 MiB)

br0:0     Link encap:Ethernet  HWaddr 00:18:39:EE:46:B6 
          inet addr:169.254.255.1  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 00:18:39:EE:46:B6 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1975 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1828 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:362340 (353.8 KiB)  TX bytes:579418 (565.8 KiB)
          Interrupt:4

eth1      Link encap:Ethernet  HWaddr 00:18:39:EE:46:B7 
          inet addr:68.41.248.60  Bcast:68.255.255.255  Mask:255.255.252.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5153 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2780 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2066312 (1.9 MiB)  TX bytes:522411 (510.1 KiB)
          Interrupt:5

eth2      Link encap:Ethernet  HWaddr 00:18:39:EE:46:B8 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1304 errors:0 dropped:0 overruns:0 frame:8937
          TX packets:1569 errors:33 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:187638 (183.2 KiB)  TX bytes:1437423 (1.3 MiB)
          Interrupt:2 Base address:0x4000

etherip0  Link encap:Ethernet  HWaddr 5E:23:C5:FD:19:8E 
          BROADCAST 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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:406 (406.0 B)  TX bytes:406 (406.0 B)

teql0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          NOARP  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)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          inet addr:172.24.218.26  P-t-P:172.24.218.26  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1412  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:0 (0.0 B)  TX bytes:1403 (1.3 KiB)


At this point, I can't get to the private network. Any attempt to ping/ssh/etc, simply hangs, and eventually times out with 'Connection timed out'. Not surprisingly, running the iptables commands on the router does not allow computers in my local LAN access to the private network, either.

At this point, all network connectivity is hosed. If I run 'vpnc-disconnect', normal network connectivity is restored, but, obviously, no VPN access.

Any other thoughts or suggestions would be appreciated.

Thanks,

-Mark
mbobak
DD-WRT Novice


Joined: 22 Feb 2010
Posts: 9

PostPosted: Thu Mar 04, 2010 10:29    Post subject: Reply with quote
Still struggling here....any more thoughts, anyone?
mbobak
DD-WRT Novice


Joined: 22 Feb 2010
Posts: 9

PostPosted: Wed Mar 17, 2010 5:06    Post subject: Reply with quote
I was out of town for over a week.....

Any other ideas? I'm not exactly encouraged at this point...

Any hope of getting this working? Any reports of others that have successfully gotten this working? Or is it just hopelessly broken?

-Mark
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum