Saturday, August 22, 2020
Pneumatic Antenna Launcher
Thursday, August 6, 2020
Report Linux IP, hostname & name servers
- nmap is used to scan IP ranges for hosts listing on port 22, then
- Remote ssh command is run to connect to each host, find FQDN (hostname -f) and configured name severs (resolv.conf)
- This assumes the user running the script has the privilege to login to each host via SSH
- The RSA key fingerprint prompt is auto accepted and the RSA key fingerprint is then discarded so that your ~/.ssh/known_hosts file is not filled up with hundreds or thousands of RSA key fingerprints
- Results are output to CSV file.
Windows DNS Server Query Stats
Generate reports from Windows DNS servers showing client query statistics. This will simply show the IP/hostname of the client, and how many queries it has generated. We used this to track down what was talking to our Windows DNS servers as part of a network migration project.
Uses Windows DNS server debug logging and Microsoft Log Parser 2.2.
DNS servers output log to local storage, log directory is shared read-only.
An intermediate host is used to run a PowerShell script via Task Scheduler that reads the log over the network, parses it and outputs a CSV and HTML report for easy viewing. This removes the need for DCs / DNS hosts to run a script and users to login to them to retrieve the report.
The script is configured to only parse the log if has been X number of hours (e.g. 12) since the last report was generated and if the log file is over X (e.g. 50mb) size. The Windows DNS server debug log is cleared and started fresh when max log size is reached (this is by design). This way we can schedule the script to run every few minutes, and capture a reasonable amount of data a couple times a day, if nether condition is met, the script does nothing.
The scripts I assembled plus config info can be found at https://github.com/lonney9/WindowsDnsServerReporting
Friday, June 19, 2020
Setup free Cloud VPN with Ad Blocking
Use Oracle Cloud always free tier, OpenVPN, Pi-Hole, and Quad9 DNS to setup your own ad, tracking, and malware blocking VPN!
Oracle Cloud VM
Installing OpenVPN
- Port 1194 has to be enabled via the Oracle Cloud Console > Networking > Virtual Cloud Networks > [network name you created] > Public Subnet > Default Security List > add a rule for UDP port 1194 (stateful).
- Angristan's OpenVPN install script made the necessary changes to iptables and everything just worked.
- Note that the default iptables contains a number of rules for the iSCSI boot block volume, do not clear the iptables rules or modify these rules. More info in Oracle-Provided Images > Essential Firewall Rules.
IPv6
The Oracle VM doesn't offer IPv6 (fine by me for now), however I found that on some operating systems if the local network assigned a valid routable IPv6 address it would prefer that and bypass the VPN.
To close that off, in the server config add:
push "block-ipv6"
DNS Servers
I also found that on Apple devices, if you push a private IP for primary DNS (like above with 10.8.0.1), and a public IP for secondary DNS - both are queries, and if the results dont match (because the private IP primary DNS is being filtered by Pi-Hole), then it will use the result from the public secondary!
This effectively bypasses the VPN for DNS, ads and junk will appear.
Only push one DNS server!
Installing Pi-Hole
Logging
Automatic Updates
Pi-Hole Updates
Speedtest
Additional Block Lists
Additional block lists can be added via Group Management > Adlists
These don't seem to be an exact science, DYOR.
See:
- https://firebog.net
- https://github.com/jacklul/pihole-updatelists
- https://github.com/blocklistproject/Lists
- https://tsmith.co/2018/setting-up-additional-pi-hole-blocklists-forwarding-for-homelab
- https://codeberg.org/spootle/blocklist/ - no longer updated.
Enable client to client communication
In /etc/openvpn/server.conf add an entry/line with: client-to-client
Add an iptables forwarding rule to enable traffic to pass out of and back into the tun0 interface:
iptables -A FORWARD -i tun0 -o tun0 -j ACCEPT
I later found I didn't need this rule, maybe a system reboot after the addition of client-to-client to server.conf works on its own?
Restart OpenVPN server and check status:
systemctl restart openvpn
systemctl status openvpn
Multiple Instances for both UDP and TCP
(Rough notes)
By default OpenVPN is setup to listen on UDP port 1194, UDP is preferred as its more efficient and any TCP traffic being tunneled will handle dropped packet retries.
Some networks may block outgoing UDP traffic and/or limit traffic to web browsing only on TCP ports 80 and 443.
A work around is to enable multiple instances of OpenVPN server, one listening on UDP and one on TCP port 443 which is least likely to be restricted.
Copy /etc/openvpn/server.conf to /etc/openvpn/server2.conf
Edit the original server.conf change dev tun to dev tun0.
Edit server2.conf:
- Change dev tun to dev tun1,
- port to 443 and proto to TCP
- Change the server line to use a new subnet e.g server 10.9.0.0 255.255.255.0
- If clients are assigned static IPs configs in the ccd directory and ipp.txt, duplicate directory and files and update addresses with server configs referencing each one.
Check the new server status: systemctl status openvpn@server2.service
Enable autostart with: systemctl -f enable openvpn@server2.service
Update the iptables rules in /etc/iptables/add-openvpn-rules.sh or /etc/iptables/rules.v4 to enable incoming connections on TCP 443 (depending on where this rule is added), and duplicate any rules related for the new OpenVPN subnet and new tun1 interface. (Need to add details).
Inter client communication (if needed) between each instance needs a pair of iptables rules to forward traffic between tun0 and tun1, e.g:
iptables -I FORWARD -i tun1 -o tun0 -j ACCEPT
Edit or remove/add a new VPN client profile to duplicate it, edit the duplicated file and change proto to tcp and the port number on the remote entry, we have one profile for UDP, and one for TCP when needed. It may be possible to include several remote lines in one profile such as https://openvpn.net/faq/how-do-i-set-up-my-profile-for-server-failover/. (Need to test this and see if it'll work reliably).
Renew Expired Server Certificate
These will expire after 3 years (I found this out the hard way)!
https://github.com/angristan/openvpn-install/issues/1002#issuecomment-1229525488
Running those commands worked, no changed needed to clients - macOS or iPhone at least.
A later comment on that issue suggested using easyrsa renew, but I couldn't figure out what version of easyrsa I had.
Privacy Badger (EFF)
Adds and additional layer to the browser
Saturday, April 11, 2020
40m Half-Square
The half square is a simple antenna design thats been around for a longtime:
- Offers good low angle gain with out the need for radials.
- Little more than 1/4 wave high (40ft at 40m).
- Current nodes/maximums are up high, compared to verticals this should have less interaction with near by structures on the ground and reduce noise pickup.
- 80 degree beam-width, can be fed directly with coax at a corner, or voltage fed at the bottom of one leg. I coax fed mine and put a 1M (million) ohm 5W metal film resister across the feed-point to bleed off any static buildup.
- Only down side is the bandwidth is a bit narrow in the model, but in practice it was more forgiving.
More reading by people smarter than me:
- Part 4: The Open-Ended Cousins - Cebik
- Using the Half-Square Antenna For Low-Band DXing - N6LF
- Bob Tails and Half Squares - K3KY

I've had the antenna up for a few days, on JS8Call where I'm most familiar with what I can hear, this antenna has shown it's DX potential on 40m overnight, with more stations spotted across the Pacific than with the OCFD. Down side is performance (as expected) with closer in stations (~1000 miles) are weaker.
The SWR bandwidth is broader than the model, it's quite usable across 40m with it centered around 7.160 MHz.

Noise pickup is negligibly different compared to the OCFD, a stark contrast to the ground mounted 43ft vertical I had up a while back which was very noisy on receive in my city location.
If I had the room for more than one wire antenna I'd keep this one up, however it's a single bander. The OCFD is back up for now..
Models are good starting point, and a way to investigate and better understand antenna systems. These tools can also help guide us to and validate the final result, if a good correlation is observed in the real world then we can have confidence the patterns and other information are accurate.
The models I have created and made available may contain errors, or overlook something someone more experienced can see. I don't claim to be an expert or authority on the subject of antenna modeling or phased arrays. I simply want to further my own knowledge and understanding of antennas which I find fascinating. Comments, suggestions, discussion are welcome - lonney@gmail.com.
This post is one of several on Phased Arrays.



