LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-01-2017, 11:57 AM   #1
Dave Mac
LQ Newbie
 
Registered: Sep 2017
Posts: 1

Rep: Reputation: Disabled
VPN Woes


Hi.

I have a RPi running Debian on a home network wired directly to my router.

I have set up a number of cron jobs, all of which work as they should do, or they did until I placed a VPN on my router.

Post installing the VPN on my router I have a failing cron task (cd /home/pi && sh wundergroundshell.sh) that pulls a shell file every five minutes which is:

#!/bin/sh
HOST='webcam.wunderground.com'
USER='XXXXXXXXXXX'
PASSWD='XXXXXXXXX'
FILE='image'

cd /home/pi

ftp -p -n -v $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
binary
put $FILE
quit
END_SCRIPT
exit

Since I installed the VPN on the router I get the following error in my syslog:

Sep 1 17:42:01 raspberrypi /USR/SBIN/CRON[1952]: (pi) CMD (cd /home/pi && sh wundergroundshell.sh)
Sep 1 17:42:06 raspberrypi postfix/sendmail[1958]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
Sep 1 17:42:06 raspberrypi postfix/postdrop[1961]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
Sep 1 17:42:06 raspberrypi postfix/cleanup[1964]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
Sep 1 17:42:06 raspberrypi postfix/pickup[657]: 7CE30414CF: uid=1000 from=<pi>
Sep 1 17:42:06 raspberrypi postfix/trivial-rewrite[1967]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
Sep 1 17:42:06 raspberrypi postfix/cleanup[1964]: 7CE30414CF: message-id=<20170901164206.7CE30414CF@raspberrypi>
Sep 1 17:42:06 raspberrypi postfix/qmgr[2807]: 7CE30414CF: from=<pi@raspberrypi>, size=1441, nrcpt=1 (queue active)
Sep 1 17:42:06 raspberrypi postfix/local[1970]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
Sep 1 17:42:06 raspberrypi postfix/local[1970]: warning: database /etc/aliases.db is older than source file /etc/aliases
Sep 1 17:42:06 raspberrypi postfix/local[1970]: 7CE30414CF: to=<pi@raspberrypi>, orig_to=<pi>, relay=local, delay=0.15, delays=0.1/0.03/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 1 17:42:06 raspberrypi postfix/qmgr[2807]: 7CE30414CF: removed

The task does not complete.

However, if I execute the shell file (wundergroundshell.sh) directly from a command line, it works!

To make the shell file executable I used chmod 755.

Any idea what I'm doing wrong?

Regards

Dave

Last edited by Dave Mac; 09-02-2017 at 01:54 AM.
 
Old 09-04-2017, 03:26 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
If the postfix/sendmail errors are due to cron being unable to send mail because of the vpn you can add MAILTO="" to the cronjob and or redirect the output of the script to a file. The file will also show if there are any script errors caused by running it from cron.
 
  


Reply



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
Iptables - Rule Forwarding Traffic From VPN to Specifically Targeting an Interface in another VPN Tunnel endtimes Linux - Networking 4 08-16-2017 08:40 PM
Multiple VPN clients to VPN server Proxy for technical support using Pi. nicedreams Linux - Networking 6 07-31-2017 06:22 PM
[SOLVED] Windows7 VPN clients behind Debian Gateway can not connect to Draytek VPN neopandid Linux - Server 3 08-31-2012 11:34 PM
vpn-vpn Bridge between two networks (1x Debian Server, 1x Cisco RVS4000) qawse Linux - Networking 2 01-14-2011 01:16 AM
VPN woes maxcoder Linux - Networking 1 12-01-2005 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:53 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