Go to advanced search

by XueHai8
Fri Dec 14, 2018 2:18 pm
Forum: Troubleshooting
Topic: Bluetoothctl and PulseAudio via Crontab problems
Replies: 0
Views: 81

Bluetoothctl and PulseAudio via Crontab problems

I'm trying to get my Pi connected to my Bluetooth speakers to play music at certain times of the day via cron jobs. The following scripts work if I run them manually in SSH, but when I put them in as cron jobs, it fails. BTConnect.sh #!/bin/bash #/usr/bin/pulseaudio -D --system /usr/bin/sudo service...
by XueHai8
Mon Dec 10, 2018 3:06 am
Forum: Networking and servers
Topic: Multiple Gateways with Failover problem
Replies: 0
Views: 213

Multiple Gateways with Failover problem

I've set up 3 OpenVPN gateway clients on my Pi set as tun0, tun1 and tun2 and they work perfectly interdependently as I am able to ping out those interfaces successfully: ping -I tun0 8.8.8.8 ping -I tun1 8.8.8.8 ping -I tun2 8.8.8.8 I am wanting to use this in a failover environment such that tun0 ...
by XueHai8
Thu Oct 18, 2018 1:28 am
Forum: Networking and servers
Topic: OpenVPN client always uses tun1, never tun0?
Replies: 0
Views: 457

OpenVPN client always uses tun1, never tun0?

Ok, back with another OpenVPN client question using multiple simultaneous hosts. I have two client config files in /etc/openvpn One goes to HostA, the other goes to HostB and I see both tun0 and tun1 in ifconfig with inet addr as expected: 10.9.0.6 (tun0) and 10.8.0.6 (tun1) Independently tested, bo...
by XueHai8
Wed Oct 17, 2018 10:07 am
Forum: Networking and servers
Topic: OpenVPN Client on tun1 fails, tun0 works
Replies: 1
Views: 338

Re: OpenVPN Client on tun1 fails, tun0 works

I think I found my answer. I needed a new entry for tun1 in /etc/iptables.up.rules
Now it seems to be working ok.
by XueHai8
Wed Oct 17, 2018 7:33 am
Forum: Other projects
Topic: Power Loss Controlled Shutdown with Automatic Restart
Replies: 3
Views: 1044

Re: Power Loss Controlled Shutdown with Automatic Restart

Thank you! I will look into that.
by XueHai8
Wed Oct 17, 2018 7:32 am
Forum: Networking and servers
Topic: OpenVPN Client on tun1 fails, tun0 works
Replies: 1
Views: 338

OpenVPN Client on tun1 fails, tun0 works

I have openvpn client on my Pi and my Pi is set as a gateway on my network. When I have 'dev tun' or 'dev tun0' in the client.conf, everything works fine. Accessing it as a gateway works fine and I can get to every remote site as expected. However, if i put 'dev tun1' in the client.conf, it still co...
by XueHai8
Sat Oct 13, 2018 4:01 am
Forum: Other projects
Topic: Power Loss Controlled Shutdown with Automatic Restart
Replies: 3
Views: 1044

Re: Power Loss Controlled Shutdown with Automatic Restart

I found the 'PiJuice' Hat. It looks to do exactly what I'm wanting, but the price (x2 that of the Pi3), is a little hard to swallow.
Any cheaper alternatives?
Thanks!
by XueHai8
Sat Oct 13, 2018 1:50 am
Forum: Other projects
Topic: Power Loss Controlled Shutdown with Automatic Restart
Replies: 3
Views: 1044

Power Loss Controlled Shutdown with Automatic Restart

Looking for a DIY (or OTS) project for a Pi3+ that allows the Pi to detect when main power has been lost, do a controlled shutdown, and then automatically power up the Pi again once main power has been restored. I'm assuming this would require a small battery to supply power to the Pi in the event o...
by XueHai8
Mon May 07, 2018 3:03 am
Forum: Troubleshooting
Topic: Can''t access Pi from other Subnet
Replies: 7
Views: 690

Re: Can''t access Pi from other Subnet

I have a pfSense router with 4 physical Lan Interfaces. So apparently I just gotta learn how to set up routing on it. :)
Thanks all!
by XueHai8
Sun May 06, 2018 12:29 pm
Forum: Troubleshooting
Topic: Can''t access Pi from other Subnet
Replies: 7
Views: 690

Re: Can''t access Pi from other Subnet

Ok. I think I understand now. Thought it might be something with the Pi that was keeping me out from another subnet.
I'll dig around my router's rules and learn up on it.
Thanks!!
by XueHai8
Sun May 06, 2018 9:22 am
Forum: Troubleshooting
Topic: Can''t access Pi from other Subnet
Replies: 7
Views: 690

Can''t access Pi from other Subnet

I have multiple subnets on my home network and 3 of my Pi's are on 192.168.3.x
If my PC is on 192.168.2.x, then I can't connect via SSH to any of the Pi's on 192.168.3.x
Is this a setting in the Raspberry Pi or would be something in my Router?
Thanks!
by XueHai8
Mon Apr 16, 2018 4:35 am
Forum: Advanced users
Topic: Pi as DNS Forwarder using DoH (DNS over HTTPS)
Replies: 2
Views: 1431

Pi as DNS Forwarder using DoH (DNS over HTTPS)

Who's up for a real challenge???! There are similar questions on CloudFlare and OpenVPN forms, but no solutions. Hopefully some expert here can point me in the right direction. Briefly: I have OpenVPN CLIENT installed on my Pi and is acting as a Gateway for my wireless router, so that all devices co...
by XueHai8
Sun Jan 07, 2018 9:58 am
Forum: Other projects
Topic: PSU w/multiple 12v & 5v outlets for Pi and Peripherals.
Replies: 6
Views: 1626

Re: PSU w/multiple 12v & 5v outlets for Pi and Peripherals.

Thank you, whyde and hippy for all your valuable information!
I didn't want to go DIY, but it looks like that the only alternative.
Thanks again!
by XueHai8
Mon Dec 18, 2017 4:18 am
Forum: Other projects
Topic: PSU w/multiple 12v & 5v outlets for Pi and Peripherals.
Replies: 6
Views: 1626

Re: PSU w/multiple 12v & 5v outlets for Pi and Peripherals.

Thanks! I'll check it out.
by XueHai8
Fri Dec 15, 2017 3:58 am
Forum: Other projects
Topic: PSU w/multiple 12v & 5v outlets for Pi and Peripherals.
Replies: 6
Views: 1626

PSU w/multiple 12v & 5v outlets for Pi and Peripherals.

I'm looking for a PSU that has multiple outlets for 12v and 5v devices. I have an electronics cabinet that has a modem, router, wifi APs, RPis, and other gear that each require its own Power Supply. It's a wiring Nightmare. Despite the risk of a single point of failure, I'd still like a single PSU t...
by XueHai8
Tue Oct 03, 2017 12:46 am
Forum: Troubleshooting
Topic: When are Predictable Network Interface Names Assigned? - Stretch
Replies: 19
Views: 10674

Re: When are Predictable Network Interface Names Assigned? - Stretch

Awesome! Thank you!! P.S. Maybe I did something else wrong, but I've noticed that even with Predictable Network Interface Names disabled, the original names (eth0, eth1, etc.) are not assigned when scripts run via rc.local or @boot crontab under Stretch. So its like the system still goes through the...
by XueHai8
Mon Oct 02, 2017 12:32 am
Forum: Troubleshooting
Topic: When are Predictable Network Interface Names Assigned? - Stretch
Replies: 19
Views: 10674

When are Predictable Network Interface Names Assigned? - Stretch

During boot, when are Predictable Network Interface Names assigned? In my bash script, I have this command to discover the network interface name of the active connection: Adapter=`ip -o link show | awk '{print $2,$9}' | grep 'UP'| awk -F: '{print $1}'` But putting it in rc.local or @boot crontab fa...
by XueHai8
Thu Sep 14, 2017 1:29 am
Forum: Troubleshooting
Topic: Distributable Bash Scripts with Predictable Network Interface Names?
Replies: 7
Views: 773

Re: Distributable Bash Scripts with Predictable Network Interface Names?

I'm still unsure where to put a bash script such that on boot it can read and determine the network interface name. rc.local doesn't work - it runs too early (before the network names have been assigned). And @boot in crontab also executes before network names have been assigned. At the moment, I ha...
by XueHai8
Wed Sep 13, 2017 8:32 am
Forum: Troubleshooting
Topic: Distributable Bash Scripts with Predictable Network Interface Names?
Replies: 7
Views: 773

Distributable Bash Scripts with Predictable Network Interface Names?

I realize the latest patch for Stretch disables Predictable Network Interface Names (aka MAC Address Base Network Naming), but this only postpones the inevitable. So my question has to do with writing Bash scripts that can be distributed to any Stretch Pi (PNIN or not) that references a Ethernet or ...
by XueHai8
Sat Aug 26, 2017 1:48 am
Forum: Troubleshooting
Topic: Stretch: Non-existent network names on boot for iptables
Replies: 7
Views: 1144

Re: Stretch: Non-existent network names on boot for iptables

adding net.ifnames=0 only postpones the inevitable of having to deal with this new naming (un)convention. Plus, as I stated earlier, it does not work on wireless adapters.
by XueHai8
Thu Aug 24, 2017 12:56 am
Forum: Troubleshooting
Topic: Stretch: Non-existent network names on boot for iptables
Replies: 7
Views: 1144

Re: Stretch: Non-existent network names on boot for iptables

Thank you all for your responses, but I think my main question was missed: So how can I code an iptables bash script, that needs to run at boot time, to get a network name that doesn't even exist until sometime after the Pi boots - and that is portable to another Pi? With Wait for Network enabled, w...
by XueHai8
Wed Aug 23, 2017 6:16 am
Forum: Troubleshooting
Topic: Stretch: Non-existent network names on boot for iptables
Replies: 7
Views: 1144

Stretch: Non-existent network names on boot for iptables

How to assign network names in iptables on boot when they don't exist yet? Here's an example: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE Set to execute at boot under /etc/rc.local - Hahahahahah - not under Stretch Network adapter names don't exist when rc.local is run, so this don't work e...
by XueHai8
Wed Aug 23, 2017 6:07 am
Forum: Troubleshooting
Topic: Stretch: Start job is running for Hold - Can't Log In
Replies: 1
Views: 1758

Re: Stretch: Start job is running for Hold - Can't Log In

Well, it appears that THIS never happens in Stretch: After=multi-user.target I had that in /lib/systemd/system/[email protected].service, under the [Unit] section and Stretch would never finish booting. The reason is was there, was so that OpenVPN would actually find the specified IP address in 'local' to bi...
by XueHai8
Wed Aug 23, 2017 3:02 am
Forum: Troubleshooting
Topic: Stretch: Start job is running for Hold - Can't Log In
Replies: 1
Views: 1758

Stretch: Start job is running for Hold - Can't Log In

No errors on boot. Last two messages are: [ TIME ] Timed out waiting for device dev-serial1.device [ *** ] A start job is running for Hold until boot process finsishes up (hours and hours / no limit) I can''t log in via SSH. I input my username and Password and it immediately terminates the connecti...
by XueHai8
Tue Aug 22, 2017 3:01 am
Forum: Troubleshooting
Topic: [Solved] Raspbian stretch - how do I restore original Ethernet names
Replies: 24
Views: 14914

Re: [Solved] Raspbian stretch - how do I restore original Ethernet names

This sucks.
It breaks hundreds of client installations.

Did ANYONE think about the millions of Bash Scripts with 'eth0' used in them?
Like for iptables?

Go to advanced search