1

I am running Xubuntu 17.10 with vpnc installed (version 0.5.3r550-3)

Everytime dhclient runs my vpnc connection fails:

From /var/log/syslog

[...] dhclient[26917]: DHCPDISCOVER on eth0 to [...]
[...] dhclient[26917]: DHCPREQUEST of [...]
[...] dhclient[26917]: DHCPOFFER of [...]
[...] dhclient[26917]: DHCPACK of [...]
...
[...] vpnc[26788]: esp sendto: Message too long

After that i have to manually run, else it does not work anymore

sudo vpnc-disconnect
sudo vpnc

Can i automate that?

Edit:

what I have found out so far is that dhclient calls /sbin/dhclient-script and this updates /etc/resolv.conf based on received values -- which are different what vpnc sets.

Maybe a solution would be to set static values here and prevent dhclient to overwrite the settings in /etc/resolv.conf.

5
  • while I'm waiting for this answer to be moved to "Unix & Linux" and marked as a duplicate, here's the answer: unix.stackexchange.com/questions/269567/… Nov 26 '17 at 21:44
  • I am not sure if this is the same problem but it works if i create the file /etc/dhcp/dhclient-exit-hooks.d/ufw where i run /usr/sbin/vpnc-disconnect && /usr/sbin/vpnc -- i will so some tests
    – fuser60596
    Nov 26 '17 at 22:26
  • in case my answer is OK, can you please accept it? Nov 26 '17 at 22:29
  • Sure. But first let me try this tomorrow on my production system
    – fuser60596
    Nov 26 '17 at 22:33
  • @TomášPospíšek It is okay if there is crosspost. While I'm not a fan of it, there is overlap between here and Unix and Linux, and the two different communities can help provide other answers that the other wouldn't have considered or such. As such, I am rejecting the migration request. (To migrate and then close as a dupe would bounce it back here and close it as offtopic, anyways, but it's on topic at both places. So I'm leaving this alone). Also, your non-answer answer (link-only answers are not considered sufficient on their own) has been converted to a comment.
    – Thomas Ward
    Nov 27 '17 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.