LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-14-2016, 09:55 PM   #1
willbprog127
Member
 
Registered: Dec 2013
Location: Pacific Northwest, USA
Distribution: Debian Linux, FreeBSD, macOS
Posts: 30

Rep: Reputation: Disabled
vpnc on Slackware 14.2 is bringing up network configuration dialog each time


Greetings!

Running both the SBo and non-SBo versions of vpnc causes Slackware 14.2 to display the network configuration dialog every time, even though the network has already been set up. (please see attached screenshot of the dialog). Thinking maybe it was a one-time thing, I went through the network setup screens, only for it to appear again after I finished the setup.

After I Ctrl + C out of the setup dialog, then vpnc connects properly. This is a pain because scripting this blocks execution when the network setup dialog comes up (in a hidden shell) every time.

Is there anything I need to check for to prevent the network dialog from coming up when vpnc is run?

Thank you in advance,

Will B
Attached Thumbnails
Click image for larger version

Name:	slackware-network-config-on-vpnc-run.png
Views:	47
Size:	8.4 KB
ID:	23771  

Last edited by willbprog127; 12-15-2016 at 02:16 PM. Reason: Removed incorrect vpnc version
 
Old 12-15-2016, 12:57 PM   #2
willbprog127
Member
 
Registered: Dec 2013
Location: Pacific Northwest, USA
Distribution: Debian Linux, FreeBSD, macOS
Posts: 30

Original Poster
Rep: Reputation: Disabled
Additional information:

I'm using a static IP address on a wired Ethernet connection. Issuing 'ip add' shows the following:

Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 40:8d:5c:38:04:9d brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.100/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::428d:5cff:fe38:49d/64 scope link 
       valid_lft forever preferred_lft forever
EDIT: 'dmesg' shows this when vpnc is first run
Code:
[ 4314.564362] tun: Universal TUN/TAP device driver, 1.6
[ 4314.564364] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>

Last edited by willbprog127; 12-15-2016 at 01:46 PM. Reason: Added dmesg info
 
Old 12-18-2016, 04:15 PM   #3
willbprog127
Member
 
Registered: Dec 2013
Location: Pacific Northwest, USA
Distribution: Debian Linux, FreeBSD, macOS
Posts: 30

Original Poster
Rep: Reputation: Disabled
I'll need to stop using Slackware then, unfortunately.
 
Old 12-18-2016, 05:38 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
I have no idea what is happening, but have you tried grepping the source to see if it is calling it directly? Or have you tried removing/renaming the script to prevent the program from calling it up?

/var/log/setup/setup.netconfig

Or have you tried contacting the SlackBuild maintainer to see if they're run into the issue at all? Or contact the actual developers of vpnc?
 
Old 12-20-2016, 03:42 PM   #5
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 973

Rep: Reputation: 238Reputation: 238Reputation: 238
On my 14.2 (current) box vpnc from SBo runs without a problem. I have never seen that network dialog.... Have you set up vpnc correctly?

In the script I use to start the tunnel the relevant (& first) line is:
Code:
#!/bin/sh
/usr/sbin/vpnc /etc/vpnc/my-vpn.conf
for your own .conf file, the file /etc/vpnc/default.conf can be copied but then needs to be completed with <your relevant details>
Code:
IPSec gateway <gateway>
IPSec ID <group-id>
IPSec secret <group-psk>
IKE Authmode hybrid
Xauth username <username>
Xauth password <password>
good luck,

Rob

Last edited by brobr; 12-20-2016 at 03:44 PM.
 
Old 12-27-2016, 01:05 PM   #6
willbprog127
Member
 
Registered: Dec 2013
Location: Pacific Northwest, USA
Distribution: Debian Linux, FreeBSD, macOS
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
Or have you tried contacting the SlackBuild maintainer to see if they're run into the issue at all? Or contact the actual developers of vpnc?
I contacted the SBo maintainer a week or two ago and they have not replied.

I have tried compiling the upstream version of vpnc and the problem still exists. I have compiled upstream's version on other platforms and distros and it does not do this.

Thanks
 
Old 12-27-2016, 01:07 PM   #7
willbprog127
Member
 
Registered: Dec 2013
Location: Pacific Northwest, USA
Distribution: Debian Linux, FreeBSD, macOS
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by brobr View Post
On my 14.2 (current) box vpnc from SBo runs without a problem. I have never seen that network dialog.... Have you set up vpnc correctly?
Thanks for the info.

I have set up vpnc properly. My config has not changed for years. My config works fine on every other Linux and BSD distro, just not Slackware. My network was properly set up at installation time and I have no other issues, only this one.

Thanks
 
Old 12-27-2016, 01:31 PM   #8
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 973

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
Originally Posted by willbprog127 View Post
Thanks for the info.
My config works fine on every other Linux and BSD distro, just not Slackware. My network was properly set up at installation time and I have no other issues, only this one.
Well during my upgrade to 14.2/current, my vpnc-config was not changed either; combined with your other distros having no problem with this vpnc set-up it seems that something in your Slackware network set-up prevents calling vpnc directly or that the manner in which you call the vpnc-tunnel is somehow compromised. That network dialog only pops-up when /sbin/netconfig is called; something I do not think is needed once your network connections are set-up. Can you find out where in your vpnc-route /sbin/netconfig gets called?
 
Old 12-27-2016, 01:54 PM   #9
willbprog127
Member
 
Registered: Dec 2013
Location: Pacific Northwest, USA
Distribution: Debian Linux, FreeBSD, macOS
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by brobr View Post
Can you find out where in your vpnc-route /sbin/netconfig gets called?
I don't have a 'vpnc-route' file, however I do have a 'vpnc-script' file. netconfig is mentioned on line 128:

Code:
if [ -r /etc/openwrt_release ] && [ -n "$OPENWRT_INTERFACE" ]; then
        . /etc/functions.sh
	include /lib/network
	MODIFYRESOLVCONF=modify_resolvconf_openwrt
	RESTORERESOLVCONF=restore_resolvconf_openwrt
elif [ -x /sbin/resolvconf ] && [ "$OS" != "FreeBSD" ]; then # Optional tool on Debian, Ubuntu, Gentoo - but not FreeBSD, it seems to work different
	MODIFYRESOLVCONF=modify_resolvconf_manager
	RESTORERESOLVCONF=restore_resolvconf_manager
elif [ -x /sbin/netconfig ]; then # tool on Suse after 11.1    # <<<<<<<<<<<<<<<<<<<<<<<< netconfig MENTIONED HERE <<<<<<<<<<<<<<<<<
	MODIFYRESOLVCONF=modify_resolvconf_suse_netconfig
	RESTORERESOLVCONF=restore_resolvconf_suse_netconfig
elif [ -x /sbin/modify_resolvconf ]; then # Mandatory tool on Suse earlier than 11.1
	MODIFYRESOLVCONF=modify_resolvconf_suse
	RESTORERESOLVCONF=restore_resolvconf_suse
else # Generic for any OS
	MODIFYRESOLVCONF=modify_resolvconf_generic
	RESTORERESOLVCONF=restore_resolvconf_generic
fi
as well as line 498:

Code:
modify_resolvconf_suse_netconfig()
{
	/sbin/netconfig modify -s vpnc -i "$TUNDEV" <<-EOF
		INTERFACE='$TUNDEV'
		DNSSERVERS='$INTERNAL_IP4_DNS'
		DNSDOMAIN='$CISCO_DEF_DOMAIN'
		EOF
}
and line 507:

Code:
restore_resolvconf_suse_netconfig()
{
	/sbin/netconfig remove -s vpnc -i "$TUNDEV"
}
So it appears that the SBo needs to patched to use the right network config program instead of thinking Slackware is Suse.
 
Old 12-27-2016, 02:01 PM   #10
willbprog127
Member
 
Registered: Dec 2013
Location: Pacific Northwest, USA
Distribution: Debian Linux, FreeBSD, macOS
Posts: 30

Original Poster
Rep: Reputation: Disabled
This has resolved the problem (although it's very hackish)

Code:
#if [ -r /etc/openwrt_release ] && [ -n "$OPENWRT_INTERFACE" ]; then
        #. /etc/functions.sh
	#include /lib/network
	#MODIFYRESOLVCONF=modify_resolvconf_openwrt
	#RESTORERESOLVCONF=restore_resolvconf_openwrt
#elif [ -x /sbin/resolvconf ] && [ "$OS" != "FreeBSD" ]; then # Optional tool on Debian, Ubuntu, Gentoo - but not FreeBSD, it seems to work different
	#MODIFYRESOLVCONF=modify_resolvconf_manager
	#RESTORERESOLVCONF=restore_resolvconf_manager
#elif [ -x /sbin/netconfig ]; then # tool on Suse after 11.1
	#MODIFYRESOLVCONF=modify_resolvconf_suse_netconfig
	#RESTORERESOLVCONF=restore_resolvconf_suse_netconfig
#elif [ -x /sbin/modify_resolvconf ]; then # Mandatory tool on Suse earlier than 11.1
	#MODIFYRESOLVCONF=modify_resolvconf_suse
	#RESTORERESOLVCONF=restore_resolvconf_suse
#else # Generic for any OS
	MODIFYRESOLVCONF=modify_resolvconf_generic
	RESTORERESOLVCONF=restore_resolvconf_generic
#fi
 
Old 12-27-2016, 02:05 PM   #11
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,090

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
can you please try editing line 128 of /etc/vpnc/vpnc-script like this
Code:
elif [ -x /sbin/netconfig ] && [ ! -f /etc/slackware-version]; then # tool on Suse after 11.1, do not use on Slackware
I'm afraid that there's no better solution than hacking the script, as vpnc seems not maintained very often upstream.

Last edited by ponce; 12-27-2016 at 02:14 PM.
 
2 members found this post helpful.
Old 12-27-2016, 02:08 PM   #12
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 973

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
I don't have a 'vpnc-route' file, however I do have a 'vpnc-script' file. netconfig is mentioned on line 128:
What is the source of this 'vpnc-script', as I do not think it has a Slackware oriented origin? What you could try is to make sbin/netconfig un-executable in your Slackware (i.e. chmod -x as root) and see whether this helps to bypass your problem on Slackware. Possibly Suse has a similarly named program in sbin that could be needed for setting up vpnc on SUSE but this has nothing to do with SLackware.

Quote:
So it appears that the SBo needs to patched to use the right network config program instead of thinking Slackware is Suse.
No, as that script has nothing to do with Slackware -as it seem s to me- but everything with Suse; and SBo is for Slackware users....
 
Old 12-27-2016, 02:18 PM   #13
willbprog127
Member
 
Registered: Dec 2013
Location: Pacific Northwest, USA
Distribution: Debian Linux, FreeBSD, macOS
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
can you please try editing line 128 of /etc/vpnc/vpnc-script like this[...]
Thank you. That works quite well.
 
1 members found this post helpful.
Old 12-27-2016, 02:22 PM   #14
willbprog127
Member
 
Registered: Dec 2013
Location: Pacific Northwest, USA
Distribution: Debian Linux, FreeBSD, macOS
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by brobr View Post
[...] that script has nothing to do with Slackware -as it seem s to me- but everything with Suse; and SBo is for Slackware users....
I think we have our wires crossed. When that part of the script finds 'netconfig' it assumes that Slackware is actually Suse, which is obviously incorrect. With ponce's change to that line of code, it now does not assume that I'm running Suse, and doesn't try to run 'netconfig'. It falls through to the appropriate part of the condition testing and uses that instead.

Last edited by willbprog127; 12-27-2016 at 02:23 PM.
 
1 members found this post helpful.
Old 12-28-2016, 07:41 AM   #15
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 973

Rep: Reputation: 238Reputation: 238Reputation: 238
It was not clear from your post what other linux-es you were running. If you look into it a bit more my proposed work-around would do the same although netconfig on slackware wouldn't work. Ponce's solution is making your script unworkable on Suse. If you happen to run that distribution while using that same script your vpnc-problem might happen there.
 
  


Reply

Tags
network, scripting, vpnc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN (vpnc) connection only seems to work every other time g-man1066 Linux - Networking 0 08-12-2010 09:13 PM
[SOLVED] Unable to go to Network configuration Dialog box pelissier Red Hat 7 11-06-2009 06:59 PM
Slackware 10 network configuration. Problem with 8139 network card drivers ! Padmakiran Linux - Networking 8 03-27-2007 06:48 AM
how to set the watiing time of bringing up network device when system is booting? jumpingguy Linux - General 4 01-21-2006 07:52 PM
Network time-out Slackware 10 kern 2.6.7 Network everwhere NIC EdwardA Linux - Hardware 2 06-26-2004 08:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration