You are not logged in.

#1 2014-06-23 21:01:43

hamhamt
Member
Registered: 2014-06-22
Posts: 4

[SOLVED] start Cisco AnyConnect VPN that installs through a .sh script

Hello, I am new to Arch Linux.  I have used Linux Mint for a year and have been learning Arch for about a month now.

I am trying to configure my computer to connect to my school's VPN so that I may connect to a remote computer from my home.  I was directed to visit vpn.csulb.edu and install the AnyConnect VPN through the website, but the automatic installer does not work with my computer, so I must use the manual installer.

The manual installer tells me to download a file called "vpnsetup.sh".  I have made the file executable:

-rwxr-xr-x 1 hamhamt users 3521454 Jun 18 21:18 vpnsetup.sh

and I run it using

 ./ vpnsetup.sh

However, when I do so I get the following error:

Installing Cisco AnyConnect Secure Mobility Client...
Removing previous installation...
/opt/cisco/vpn/bin/vpn_uninstall.sh: line 171: /etc/rc.d/vpnagentd: No such file or directory
rm: cannot remove ‘/etc/rc.d/vpnagentd’: No such file or directory
mv: cannot stat ‘/opt/cisco/vpn/*.log’: No such file or directory
Extracting installation files to /tmp/vpn.qsnRtL/vpninst778357757.tgz...
Unarchiving installation files to /tmp/vpn.qsnRtL...
install: cannot create regular file ‘/etc/rc.d/vpnagentd’: No such file or directory

I have been researching the switch from rc.d to systemd and I am aware that the old rc.d files no longer work with arch, so it is my understanding that the vpnsetup.sh installer will not work with Arch unless I am to enable something with systemctl that allows rc.local scripts to run.  I am not entirely sure how to enable rc scripts to work though.

I also do not have any directory called /etc/rc.d in the /etc/ folder, so I am not sure if that is an issue.

If there is an alternative to configuring a VPN that does not depend on the use of this .sh script I am also open to that.  I have read the ArchWiki page on OpenConnect which talks about installing NetworkManager and nm-applet, but I am unsure on how to connect to the VPN address using this applet.  I also lose my regular internet connection when using the applet.  I believe this has to do with running both NetworkManager along with wifi-menu poses some sort of problem.

So if anyone were able to direct me to a resource or help with either a.) fixing the rc.d problem or b.) configuring a VPN through NetworkManager or wifi-menu I would appreciate it greatly.

Thank you!

Last edited by hamhamt (2014-06-23 23:17:23)

Offline

#2 2014-06-23 21:18:36

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] start Cisco AnyConnect VPN that installs through a .sh script

Check the AUR, there are a few different packages that provide a client...

https://aur.archlinux.org/packages/?K=anyconnect


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2014-06-23 23:16:58

hamhamt
Member
Registered: 2014-06-22
Posts: 4

Re: [SOLVED] start Cisco AnyConnect VPN that installs through a .sh script

Thank you for your response slithery.  I was able to get NetworkManager working by right clicking the applet and inputting my WPA2 password.  I am now able to connect to the VPN.

Offline

#4 2014-11-28 17:20:13

elrengo
Member
From: Argentina
Registered: 2014-11-06
Posts: 56

Re: [SOLVED] start Cisco AnyConnect VPN that installs through a .sh script

Hi! I have the same issue. but open-connect client provide for network manager does not works. And is not possible to install the cisco client in aur repository.

When I try to run the vpnsetup.sh that is the log:

[elrengo@xpsl421x Downloads]$ sudo ./vpnsetup.sh 
Installing Cisco AnyConnect Secure Mobility Client...
Extracting installation files to /tmp/vpn.hwx3Ss/vpninst171422202.tgz...
Unarchiving installation files to /tmp/vpn.hwx3Ss...
install: cannot create regular file ‘/etc/rc.d/vpnagentd’: No such file or directory
[elrengo@xpsl421x Downloads]$ 

When I try with open connect required some information that my works do not provide. Only I have Gateway, user, password (user and password is my Windows Domain USR/PASS).
The openclient requiered ca and group passowrd and other information.

When I try to install ciscovpn client:

[elrengo@xpsl421x ca]$ yaourt -S cisco-vpnclient

==> Downloading cisco-vpnclient PKGBUILD from AUR...
x ciscovpn@.service
x dkms.conf
x install
x PKGBUILD
x fixes.patch
Comment by t0nedef  (2014-01-26 02:52)
Sorry for the delay on a reply.

@blablubb1234: I have added a service file, ciscovpn@PROFILE.service. Your user name and password need to be in the profile for it to work. Be aware if your server hasn't allowed passwords to be saved this won't be very helpful to you as after the first connection the password will be erased. I ended up making a script that feeds the password.

@Roken: I added dkms as a required package, and it should now auto-compile fine as long as the dkms service is enabled. Make sure you have your kernel sources installed.

Comment by palmaway  (2014-06-29 01:59)
The md5sum of the vpnclient doesn't match with the one mentioned on the Cisco download page (http://goo.gl/mVBAaL):
de869c26dbc3b8851759907855dee48c
for the same file 'vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz'. I have a copy of the software provided by a Cisco partner, and it does match with the above checksum. Why is the package linked in the PKGBUILD different? Use caution, it is not provided by a verifiable source! THE DOWNLOAD MIGHT BE COMPROMISED!

Comment by stevenhoneyman  (2014-06-29 02:37)
It has been tampered with, to fix some kind of AMD bug apparently:
https://bbs.archlinux.org/viewtopic.php?pid=1431151#p1431151

Comment by jsteel  (2014-06-29 08:30)
Please use/link to the upstream version here. If you want to fork their version (and if you have the right to), upload your version under a different name.

Comment by noctlos  (2014-11-20 20:03)
I keep getting this build error.

CC [M]  /tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient/interceptor.o
/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient/interceptor.c: In function ‘interceptor_mod_init’:
/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient/interceptor.c:967:81: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
interceptor_dev= alloc_netdev( 0, interceptor_name, (void *)interceptor_init);
^
/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient/interceptor.c:967:22: error: ‘alloc_netdev’ undeclared (first use in this function)
interceptor_dev= alloc_netdev( 0, interceptor_name, (void *)interceptor_init);
^
/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient/interceptor.c:967:22: note: each undeclared identifier is reported only once for each function it appears in
/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient/interceptor.c: At top level:
/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient/interceptor.c:138:1: warning: ‘interceptor_init’ defined but not used [-Wunused-function]
interceptor_init(struct net_device *dev)
^
scripts/Makefile.build:257: recipe for target '/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient/interceptor.o' failed
make[2]: *** [/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient/interceptor.o] Error 1
Makefile:1373: recipe for target '_module_/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient' failed
make[1]: *** [_module_/tmp/yaourt-tmp-thonx/aur-cisco-vpnclient/src/vpnclient] Error 2
make[1]: Leaving directory '/usr/lib/modules/3.17.2-1-ARCH/build'
Makefile:40: recipe for target 'default' failed
make: *** [default] Error 2

cisco-vpnclient 4.8.02.0030_k9-7  (Thu Apr 19 16:18:51 ART 2007)
( Unsupported package: Potentially dangerous ! )
==> Edit PKGBUILD ? [Y/n] ("A" to abort)
==> ------------------------------------
==> n

==> cisco-vpnclient dependencies:
 - linux (already installed)
 - lib32-gcc-libs (already installed)
 - dkms (already installed)
 - linux-headers (already installed)


==> Edit install ? [Y/n] ("A" to abort)
==> -----------------------------------
==> n

==> Continue building cisco-vpnclient ? [Y/n]
==> -----------------------------------------
==> 
==> Building and installing package
==> Making package: cisco-vpnclient 4.8.02.0030_k9-7 (Fri Nov 28 15:39:47 ART 2014)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2002k  100 2002k    0     0  63648      0  0:00:32  0:00:32 --:--:--  133k^[[A
  -> Found fixes.patch
  -> Found ciscovpn@.service
  -> Found dkms.conf
==> Validating source files with md5sums...
    vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz ... Passed
    fixes.patch ... Passed
    ciscovpn@.service ... Passed
    dkms.conf ... Passed
==> Extracting sources...
  -> Extracting vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz with bsdtar
==> Starting build()...
  -> Applying patches...
patching file frag.c
patching file interceptor.c
patching file IPSecDrvOS_linux.c
patching file linuxcniapi.c
patching file linuxkernelapi.c
patching file Makefile
  -> Making a copy for dkms...
cp: omitting directory ‘orig’
  -> Building...
make -C /lib/modules/3.17.3-1-ARCH/build SUBDIRS=/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient modules
make[1]: Entering directory '/usr/lib/modules/3.17.3-1-ARCH/build'
  CC [M]  /tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/linuxcniapi.o
  CC [M]  /tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/frag.o
  CC [M]  /tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/IPSecDrvOS_linux.o
  CC [M]  /tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/interceptor.o
/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/interceptor.c: In function ‘interceptor_mod_init’:
/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/interceptor.c:967:81: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
     interceptor_dev= alloc_netdev( 0, interceptor_name, (void *)interceptor_init);
                                                                                 ^
/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/interceptor.c:967:22: error: ‘alloc_netdev’ undeclared (first use in this function)
     interceptor_dev= alloc_netdev( 0, interceptor_name, (void *)interceptor_init);
                      ^
/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/interceptor.c:967:22: note: each undeclared identifier is reported only once for each function it appears in
/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/interceptor.c: At top level:
/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/interceptor.c:138:1: warning: ‘interceptor_init’ defined but not used [-Wunused-function]
 interceptor_init(struct net_device *dev)
 ^
scripts/Makefile.build:257: recipe for target '/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/interceptor.o' failed
make[2]: *** [/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient/interceptor.o] Error 1
Makefile:1373: recipe for target '_module_/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient' failed
make[1]: *** [_module_/tmp/yaourt-tmp-elrengo/aur-cisco-vpnclient/src/vpnclient] Error 2
make[1]: Leaving directory '/usr/lib/modules/3.17.3-1-ARCH/build'
Makefile:40: recipe for target 'default' failed
make: *** [default] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build cisco-vpnclient.

Last edited by elrengo (2014-11-28 18:42:54)

Offline

#5 2017-09-11 21:59:36

victorbrca
Member
From: Toronto
Registered: 2017-09-11
Posts: 3
Website

Re: [SOLVED] start Cisco AnyConnect VPN that installs through a .sh script

New user here, first post...

I'm also having the same issue on a brand new Arch install, and up to date. Unfortunately 'openconnect' does not work for me (never did), and I know the Cisco version (anyconnect-linux64-4.4.01054-core-vpn-webdeploy-k9.sh) I'm trying to install works (tested in other distros).

Checking the code it looks like the installer is trying to setup the service as old init.d/rc.d, however I do not have the expertise to change their installer. I'm wondering if I install 'systemd-sysvcompat' if it will help?

# Locate the init script directory
if [ -d "/etc/init.d" ]; then
  INITD="/etc/init.d"
elif [ -d "/etc/rc.d/init.d" ]; then
  INITD="/etc/rc.d/init.d"
else
  INITD="/etc/rc.d"
fi

# BSD-style init scripts on some distributions will emulate SysV-style.
if [ "x${CHKCONFIG}" = "x" ]; then
  if [ -d "/etc/rc.d" -o -d "/etc/rc0.d" ]; then
    BSDINIT=1
    if [ -d "/etc/rc.d" ]; then
      RCD="/etc/rc.d"
    else
      RCD="/etc"
    fi
  fi
fi

if [ "x${INITD}" != "x" ]; then
  echo "Installing "${NEWTEMP}/${INIT_SRC} >> /tmp/${LOGFNAME}
  echo ${INSTALL} -o root -m 755 ${NEWTEMP}/${INIT_SRC} ${INITD}/${INIT} >> /tmp/${LOGFNAME}
  ${INSTALL} -o root -m 755 ${NEWTEMP}/${INIT_SRC} ${INITD}/${INIT} || exit 1
  if [ "x${CHKCONFIG}" != "x" ]; then
    echo ${CHKCONFIG} --add ${INIT} >> /tmp/${LOGFNAME}
    ${CHKCONFIG} --add ${INIT}
  else
    if [ "x${BSDINIT}" != "x" ]; then
      for LEVEL in ${SYSVLEVELS}; do
        DIR="rc${LEVEL}.d"
        if [ ! -d "${RCD}/${DIR}" ]; then
          mkdir ${RCD}/${DIR}
          chmod 755 ${RCD}/${DIR}
        fi
        ln -sf ${INITD}/${INIT} ${RCD}/${DIR}/${SYSVSTART}${INIT}
        ln -sf ${INITD}/${INIT} ${RCD}/${DIR}/${SYSVSTOP}${INIT}
      done
    fi
  fi

---------------------------------------------------------------------------------------
User 437407 with the Linux Counter

Offline

#6 2017-09-11 22:47:55

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [SOLVED] start Cisco AnyConnect VPN that installs through a .sh script

Unfortunately, that script would have to be rewritten for Arch, so I doubt you can use it unless you know bash programming.  Also, you should create your own thread on the issue you are having, since necrobumping is against the CoC.  Please start a new thread if you can't solve this on your own.

Offline

#7 2017-09-11 22:50:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] start Cisco AnyConnect VPN that installs through a .sh script


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB