Go to advanced search

by malicious
Sat Nov 12, 2016 2:09 am
Forum: Troubleshooting
Topic: Can't Backup RPi using dd. One partition causing issues
Replies: 2
Views: 597

Re: Can't Backup RPi using dd. One partition causing issues

The "diskutil umountDisk /dev/disk2" command may need to be # diskutil umount /dev/disk2 s{1,6} or # diskutil umount /dev/disk2 s* /dev/disk2 should refer to the physical device and /dev/disk2s1, /dev/disk2s2, etc. the partitions. umountDisk might be having trouble with some of the partitions. My Ma...
by malicious
Sat Nov 12, 2016 2:00 am
Forum: Raspbian
Topic: Disable IPv6
Replies: 7
Views: 5634

Re: Disable IPv6

Configuring IPv6 support in the kernel and user space applications are separate. Settings such as net.ipv6.conf.all.disable_ipv6 net.ipv6.conf.default.disable_ipv6 etc. set IPv6 kernel support but applications will try to use IPv6 regardless if configured to do so. Whatever program is generating tho...
by malicious
Sun Oct 30, 2016 2:57 am
Forum: Troubleshooting
Topic: iscsi initiator doesn't work at boot tme
Replies: 2
Views: 807

Re: iscsi initiator doesn't work at boot tme

The problem looks to be dependency cycles/loops which systemd tries to break out of by not starting certain services, and open-iscsi is one of them. Here is another thread on this issue with some possible work-arounds: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=125856 If the system func...
by malicious
Sat Oct 29, 2016 4:53 pm
Forum: Networking and servers
Topic: Virtualhosts, two sites on one IP [Solved]
Replies: 2
Views: 628

Re: Virtualhosts, two sites on one IP

Did you add a 'Listen 8080' directive to httpd.conf? If Apache is already listening on 8080, the problem could be firewall related. This will open up TCP port 8080 on iptables: $ sudo iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT Should the problem be network/firewall related, command line ...
by malicious
Wed Oct 26, 2016 6:23 am
Forum: Beginners
Topic: Scripting an automatic reboot at semi-random variables.
Replies: 2
Views: 490

Re: Scripting an automatic reboot at semi-random variables.

anacron[1][2] might accomplish what you're looking for. Here's an example using the combination of cron and anacron. The basic idea is to create an anacron job with a random time delay, then create a cron job to trigger anacron at regular intervals. First the anacron file. Your system probably has a...
by malicious
Mon Oct 17, 2016 6:54 pm
Forum: Networking and servers
Topic: sftp to USB mount
Replies: 3
Views: 1386

Re: sftp to USB mount

The cleanest way to do that is with client-side options or settings. For example, with the command-line sftp client: $ sftp [email protected]_host:/path/to/usb_drive will log into the sftp server at /path/to/usb_drive instead of /home/some_user. For GUI clients like FileZilla, there should be a setting...
by malicious
Mon Oct 17, 2016 2:43 am
Forum: Networking and servers
Topic: vpn wifi drop
Replies: 2
Views: 594

Re: vpn wifi drop

The safest place to start may be clearing this project with your employer if you haven't yet.

With that out of the way, a reverse SSH tunnel or VPN initiated from the Pi at work to a computer at home should accomplish what you want.
by malicious
Mon Oct 17, 2016 2:28 am
Forum: Beginners
Topic: run py script from cron @reboot
Replies: 7
Views: 7630

Re: run py script from cron @reboot

cron may not know where to find the Python interpreter because it doesn't share your user account's environment variables. If Python is at: /usr/bin/python you can change the cron job to use an absolute path: @reboot /usr/bin/python /home/pi/email_on_reboot.py or add a PATH value to the crontab: PAT...
by malicious
Sun Oct 16, 2016 9:02 am
Forum: Networking and servers
Topic: Connecting via WiFI using ONLY command line (not a conf)
Replies: 1
Views: 501

Re: Connecting via WiFI using ONLY command line (not a conf)

nmcli, as the name suggests, is the command line interface to NetworkManager. If you're using Raspbian, the apt package is named network-manager. As a warning, recent versions of Raspbian use dhcpcd which may not play nice with NetworkManager. https://wiki.archlinux.org/index.php/Talk:NetworkManager...
by malicious
Sun Oct 16, 2016 8:50 am
Forum: Networking and servers
Topic: Is Openvpn configured to listen on 1194 udp
Replies: 16
Views: 9832

Re: Is Openvpn configured to listen on 1194 udp

What happens when the netcat command is run on the Pi itself?

$ nc -uv localhost 1194

Are there any error messages in the server log file? It's specified with 'log' or 'log-append' in the server's .conf file.
by malicious
Sat Oct 15, 2016 12:37 am
Forum: Networking and servers
Topic: Trying to setup smokeping, permissions issue
Replies: 7
Views: 1455

Re: Trying to setup smokeping, permissions issue

Pandemic wrote:That's what's not making sense to me. I expected it to be a file to modify/save
That looks like what the tutorial is doing. Open files

/etc/smokeping/config.d/Probes

and

/etc/smokeping/config.d/Targets

with a text editor like vi or nano. They shouldn't be run as executables.
by malicious
Sat Oct 15, 2016 12:18 am
Forum: Networking and servers
Topic: Cannot access index.html from ip address in browser
Replies: 4
Views: 1019

Re: Cannot access index.html from ip address in browser

There are text-only Web browsers such as links or elinks. telnet also works for testing basic connectivity with:

$ telnet localhost 80
by malicious
Thu Oct 06, 2016 10:52 pm
Forum: Networking and servers
Topic: Automated OpenVPN Server Setup Script
Replies: 68
Views: 38258

Re: Automated OpenVPN Server Setup Script

Nothing stands out that would explain why ssh and traceroute work but apt doesn't. Is there a web proxy? Does DNS work?

$ host -a google.com

The last line from 'host -a' indicates the DNS server in use. Is it what you expect?
by malicious
Thu Oct 06, 2016 10:02 pm
Forum: Raspbian
Topic: Official "Read only" instructions on raspbian.org
Replies: 6
Views: 1265

Re: Official "Read only" instructions on raspbian.org

I think that the current Raspbian rootfs configuration is broken because it is slowly "drilling holes" on the SD card sectors and it is therefore destroying the SD card after a few months/years of standard usage. (For example: swap is mounted on SD card media) We can notice this problem by the high...
by malicious
Thu Oct 06, 2016 2:24 am
Forum: Networking and servers
Topic: Automated OpenVPN Server Setup Script
Replies: 68
Views: 38258

Re: Automated OpenVPN Server Setup Script

I had initially thought that I would just hose the whole thing and start from scratch and install fail2ban 'before' setting up the VPN but I really don't fancy waiting for the dh 2048bit key to be created all over again! Also, I'll still have to problem*. Should it come to that, you can save and re...
by malicious
Tue Oct 04, 2016 1:36 am
Forum: Raspbian
Topic: dhclient-script wheezy vs. jessie
Replies: 1
Views: 476

Re: dhclient-script wheezy vs. jessie

System shell scripts were converted from running under bash to dash $ ls -l $(which sh) lrwxrwxrwx 1 root root 4 Jan 20 2014 /bin/sh -> dash because the latter is faster and requires fewer resources. Because bash features are a superset of dash features, the most likely negative for switching from d...
by malicious
Mon Oct 03, 2016 6:05 am
Forum: Networking and servers
Topic: Google Drive Backup
Replies: 4
Views: 1918

Re: Google Drive Backup

Two projects that may work are:

http://rclone.org/

https://github.com/odeke-em/drive

Disclaimer: I've never used either, only seen them as suggestions for Linux Google Drive clients because there is no official one.
by malicious
Mon Oct 03, 2016 5:51 am
Forum: Troubleshooting
Topic: Browser Not Connecting to Internet
Replies: 1
Views: 949

Re: Browser Not Connecting to Internet

169.254.x.x and fe80:: are link-local IP addresses[1] your Pi assigned itself when it couldn't find a DHCP server. Try pinging your router from the Pi and checking for error messages from the outputs of: $ sudo grep -i dhcp /var/log/syslog $ sudo journalctl | grep -i dhcp [1] https://en.wikipedia.or...
by malicious
Mon Oct 03, 2016 5:41 am
Forum: Troubleshooting
Topic: Not understanding the problem
Replies: 6
Views: 851

Re: Not understanding the problem

Tourless wrote:

Code: Select all

 * * * * /home/pi/oiltankwebcam.sh 2>&30
In case it wasn't just a copy/paste error, the cron job is missing one time value. A task that runs hourly would look something like:

0 * * * * some_command

In other words, whenever the time is 0 minutes, any hour, any day of the month, etc.
by malicious
Sun Oct 02, 2016 8:37 am
Forum: Networking and servers
Topic: Raspberry Pi 2 server
Replies: 4
Views: 1064

Re: Raspberry Pi 2 server

ownCloud's project founder and many key developers recently left to work on a fork Nextcloud[1], which will most likely be the much more active project moving forward. There was a Nextcloud write-up posted here some days ago that may be worth a read: https://www.raspberrypi.org/forums/viewtopic.php?...
by malicious
Sat Oct 01, 2016 6:21 am
Forum: Beginners
Topic: UID & PW Reset
Replies: 1
Views: 350

Re: UID & PW Reset

The current user's password can be changed with:

$ passwd

and user id can be changed with:

$ sudo vipw

or simply editing /etc/passwd directly but you probably shouldn't without a good reason to do so.
by malicious
Sat Oct 01, 2016 6:11 am
Forum: Beginners
Topic: Make a command run in screen on boot?
Replies: 1
Views: 392

Re: Make a command run in screen on boot?

In theory, this should work: Create a shell script(/home/pi/python_screen.sh or something) containing: #!/bin/sh /bin/screen -d -m -S "python screen" /bin/screen -S "python screen" -p 0 -X stuff "/home/pi/python_script.py\r" Then create a cron job to start the shell script at boot: $ crontab -e @reb...
by malicious
Fri Sep 30, 2016 1:00 am
Forum: Networking and servers
Topic: VPN Server No Internet
Replies: 10
Views: 13617

Re: VPN Server No Internet

Create a file to hold the iptables rules. This example will use /etc/iptables.rules but other locations are fine too. The contents will be: *filter :FORWARD ACCEPT COMMIT *nat -A POSTROUTING -o eth0 -j MASQUERADE COMMIT Create another file /etc/network/if-pre-up.d/iptables with contents(change /etc/...
by malicious
Thu Sep 29, 2016 6:33 am
Forum: Beginners
Topic: Auto mounting a USB drive on Raspberry Pi Zero
Replies: 8
Views: 1519

Re: Auto mounting a USB drive on Raspberry Pi Zero

There are techniques for scheduling a command to run later without user action. Here is one using a cron job: $ sudo crontab -e Append a line: */2 * * * * /sbin/blkid > /tmp/blkid_results.txt Save and exit. Then log off, replace the wireless adapter with storage device, wait 2+ minutes, switch devic...
by malicious
Thu Sep 29, 2016 6:06 am
Forum: Troubleshooting
Topic: Autorunning at boot
Replies: 2
Views: 491

Re: Autorunning at boot

The second question, how to run a new program with a new terminal via ssh, so that the program can be run. thank you Programs can be made to run in the background by adding a '&' to the end of its command. For example: $ bigprogram & List background processes with: $ jobs -l (the option is a small ...

Go to advanced search