Hi Andreas,
this is complete guide how to install vpnc:
!!!!!!!edit file:
rm /etc/ipkg.conf
cp /rom/etc/ipkg.conf /etc/ipkg.conf
vi /etc/ipkg.conf
**************************************************************************************
src whiterussian http://downloads.openwrt.org/whiterussian/packages
src non-free http://downloads.openwrt.org/whiterussi … s/non-free
src florian http://openwrt.alphacore.net
dest root /
dest ram /tmp
*************************************************************************************
!!!!!!!!!!!istall all packages for vpnc:
ipkg update
ipkg install vpnc libgcrypt srelay kmod-tun
insmod tun
!!!!!!!edit file:
vi /etc/vpnc.conf
*******************************************************
Interface name tun0
IPSec gateway 88.88.129.58
IPSec ID MYgroupname
IPSec secret MYgrouppassword
Xauth username MYname
Xauth password MYpassword
************************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! it is a minimum needed entries in vpnc.conf
!!!!!!!!!!!!!runn tunnel:
vpnc
!!!!!!!!!!!!!verify tunnle:
ifconfig tun0
root@OpenWrt:~# ifconfig tun0
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:88.88.139.129 P-t-P:88.88.139.129 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1412 Metric:1
RX packets:4768 errors:0 dropped:0 overruns:0 frame:0
TX packets:4985 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:1438576 (1.3 MiB) TX bytes:466406 (455.4 KiB)
root@OpenWrt:~#
!!!!!!!!!!!!!if RX and TX packets is 0 then You must add routes to remote network:
route add -net 16.16.16.0 netmask 255.255.255.0 dev tun0
!!!!!!!!!!!!!now You can ping 16.16.16.1 from openWRT:
root@OpenWrt:~# ping 16.16.16.1
PING 16.16.16.1 (16.16.16.1): 56 data bytes
64 bytes from 16.16.16.1: icmp_seq=0 ttl=255 time=109.4 ms
64 bytes from 16.16.16.1: icmp_seq=1 ttl=255 time=20.1 ms
!!!!!!!!!!!!!!!!!!!if You need to ping remote network from PC from LAN or WLAN behind OpenWRT, you must permit this:
iptables -A forwarding_rule -s 192.168.1.0/24 -d 16.16.16.0/24 -j ACCEPT
!!!!!!!!!!!!!!!And I must do NAT from local network 192.168.1.0 to ip address of tunnel 88.88.139.129, because the remote cisco VPN server seems that there is only one client wiht 88.88.139.129.
iptables -t nat -A postrouting_rule -s 192.168.1.0/24 -d 16.16.16.0/24 -j SNAT --to 81.88.139.129
what I need now:
1. Automaticaly run this everything after reboot of OpenWRT
2. configuring something as keepalive, because when the tunnel goes down, I must killall vpnc, then run vpnc and add routes
3. make something as source route, because I need some local users to use tunnel as default route and some to use ISP default gateway.
Please can anybody help me?
Thanks
Gabriel