Wednesday, December 1, 2021

FT8 - Now it makes sense!

Dark side cookies

For a time FT8 seemed pointless to simply log the minimum for a contact in an automated way and move on, the social side and having a chat getting to know someone, and share ideas is removed from the equation.

I always did see FT8's good points and purpose, its a weak signal mode, efficient, and gets the job done neat and tidy. 

Ideal for contesting, special events, or working a DX-Pedition for example to get that rare one in the log where all that is happening is exchanging of callsigns and signal reports anyway. FT8 simply took that function, and made it efficient. No problem with that.

But I was being a Curmudgeon, so back in April this year I tried out FT8 to at least figure out how to drive it. With a busy summer out of the way and fall around the corner I decided time to get a little more serious and start using logging software and maybe work towards getting awards, and QSL cards to stick on the wall.

The result was MacLoggerDX, WSJT-X, JS8Call, Fldigi and Flrig Integration. MacLoggerDX does the right things, and once configured makes rig control, and logging contacts with WSJT-X, JS8Call, and Fldigi seamless, couple mouse clicks and its all done. Now there is no excuse, the tools are in-front me to get to work.

Now it makes sense, a lot of sense. Most FT8 ops upload logs to LoTW, which is appreciated if like me you want them to also count towards awards for example. After a few weeks I had logged and confirmed contacts all over the world, and sent and received a number of QSL cards.

This reminded me how much I enjoyed sending and receiving paper QSL cards too. Today when everything is electronic and instant, it's nice to receive a physical object from somewhere that took a journey.

This mode also spurred me to upgrade my antenna systems. The OCFD was replaced with 130 ft doublet fed with 600 ohm line into a remote auto tuner which is interfaced to the rigs ATU port. This makes band changes seamless, and enables me to operate on all bands 160-10m. I finally assembled the 6m 3 element LFA Yagi I had bought, which then blew down in strong winds a few weeks later, and since tediously unbent with a vice, straight edge and a mallet. See Thats the end of Six meters for a while..

Maybe the spark gap ops didn't like the new kids running vacuum tubes at the time either. It's just an evolution of technology that enables us to set the bar higher. DXCC is easier, so we get that then set the next goal and keep going, and/or set goals with friends and compete.

For example, KL2R and I set the goal of a clean sweep, logging and confirming a contact on every band. This turned out to be quite fun.

I've also logged contacts with friends I've since not heard from in a long time, and follow ups via email sometimes result which is a nice surprise.

All the same I enjoy text chats on JS8, PSK31, and talking to people on voice modes just like always. Remember to stop and smell the roses.

I've simply added an additional mode I can use for awards and other goals, and to get some of those nice QSL cards that would otherwise be much harder or if not impossible to get.

100 countries confirmed in LoTW under three months - I started on September 10th, and 100th country was confirmed on December 1 by E75C. Simply from putting in a consistent effort with a modest station - a single wire antenna, 80W, sometimes 350W when needed.

Time for a break from chasing DX, work on some other projects and think about the next goal..


8J1RL QSL card

Monday, November 15, 2021

Thats the end of Six meters for a while..

Got a bit too windy today..

I was out walking around the local park and lake not far from here when that gust turned up, just about blew me over sideways, branches cracking and flying out of the trees, 5 minutes later it was gone like nothing happened. 

6m LFA bent
Not a good rake either!

6m LFA bent

¯\_(ツ)_/¯


In the few weeks I had the antenna up, I got some good results on FT8, Florida being the furtherest:

6m grids



Unbending 6m LFA

26 Nov, straightening bent antenna with a straight edge and mallet, finding and removing each bend, after getting the big bends out with the vice. Of course I have the laptop remoted into the shack PC with FT8 running on 10m watching for KL2R in Alaska, once we get 10m logged thats a clean sweep on all bands 160-10m.

20 March 2022 I have the LFA back in the sky, and upgraded my mast mounting system to better resist unexpectedly strong wind gusts.

Sunday, November 14, 2021

Doublet Antenna

130 ft Doublet Antenna, covers all nine HF bands 80m - 10m, and optionally 160m with reasonable patterns.

600 ohm feeder > 1:1 ATU balun > switching network > Remote antenna coupler / tuner. 

Doublet antenna remote ATU

The conundrum I had was how to get all nine HF bands 80m - 10m, and 160m from one antenna, with reasonable patterns, performance, and rated for high power. My limitation is having 1/4 acre where I can fit at most 130 ft of wire in a straight line horizontally.

Decided a doublet fed with 600 ohm open line into a remote ATU was the best option. Also, linking the feeders together and driving it against ground as a T antenna enables use on 160m, and a useful set of alternate patterns on 80 through 40m.

The matching network we bring into the 21st century, high quality remote ATU and high quality 1:1 ATU current balun. Remember, any system is only as strong as the weakest link..

  • Balun Designs model 1171 5 kW 1:1 ATU current balun (studs in, studs out).
  • Remote ATU Stockcorner JC-4s 1 kW automatic antenna tuner (5 stars on eHam).
  • Doublet and feeder from TrueLadderLine. Could built it, cheaper to buy it vs time.

The JC-4s ATU can be interfaced to Kenwood and Icom rigs to operate via the Tuner button, and setup to bypass keying an amplifier during tuning. See JC-4s Automatic ATU and Icom IC-7300 Hints on PA0FRI's site.

Initially tuner was very slow to find matches on the upper HF bands when interfaced to the Icom ATU port, but was very quick using the supplied manual tuner interface and 15W carrier to tune. The TUNE carrier power in my Icom 7300 was under 10W, raised it to around 15W the per the service manual which solved the problem.


T Antenna mode, this turns it into a vertical with top loading by feeding the two legs of the feeder together against ground:

  • 160m - 1/8th wave vertical, top loading results in uniform current along the vertical.
  • 80m - 1/4 wave vertical, top loading moves current max to top away from ground noise.
  • 60 to 40m - not sure how you would describe it.
Since the ATU is 10 ft above ground, this places it around 15% up the total vertical length, EZNEC predicts reasonable impedances.

For a while I've been undecided if the T (or an inverted L / vertical monopole) should be directly connected to the ATU's "hot" output terminal, and the ATU ground connected to ground, OR if the 1:1 balun should be left in place, with the T connected to one terminal and ground to the other.

According to W8JI's Counterpoise Systems page the latter should be used, as the overall antenna system is neither perfectly balanced or un-balanced. It is better to force equal and opposite currents, and ensure the coax and control cable shields are choked/isolated so they do not become part of the antenna system. The shields should still be grounded beyond the choke for lightning protection per NEC.

Feeding the system with the balun inline resulted in better matches on 40m, and got rid of an RFI problem.

Sept 2023 I have a remote switching network in the works that will be driven from the JC-4s A/B signal allowing me to remotely change between a doublet and vertical T. More about that once I get it installed.

So, how does it work? I had it up on Oct 21 but connected to my Icom AH-4 tuner which limited me to 100W while I waited for the JC-4s. With the 100 ft feeder strung up to the AH-4 in a temporary location it tuned all bands except 160m.

The first thing I noticed was how much quieter it is on receive compared to my OCFD which had a Balun Designs OCF balun optimized for the job with a good amount of current choking. Now I wonder how much noise is picked up by the coax shield and leaks or couples past the balun to the antenna, then back into the receiver? Noise dropped two to three S units between 80 and 20m.

So far the results on 12, 15, 17, 20, 30m have been good on FT8. SNR each way mostly equal, and looking the TX/RX performance with other stations in my grid on pskreporter things are fairly comparable.

Morning of 22 Oct 21 I worked 8J1RL Antartica on 40m FT8, about 1 hour after sunrise.
Confirmed in LoTW so not making this up :-)


8J1RL FT8 QSO


Later, 7P8RU Lesotho on 17m FT8 (since got them on 12, 30, and 60m), and if that wasn't enough.. After days and days of trying to get 3DA0WW Eswatini using the OCFD and up-to 500W on different bands, I successfully worked them at greyline that evening on 80m FT8 with 80W

That I managed to get those three rare ones with only 80W TX on my end was a nice surprise.

Weekend Oct 30 was CQ WW SSB contest, we had some good propagation on the upper bands. Saturday I worked a number of stations on 10m SSB with 100W in South America, Caribbean, and Japan late in the evening. KL7RA a well known contest station in Alaska commented I had the biggest signal on 15m they'd seen.. Probably something to do with one of those 9.8 dBi lobes that falls north west :-)  also worked them on 20 and 40m. 9/10 times I'd get heard on the first or second call, following morning on 20m got OH8X (super station in Finland), and a couple others.

Also got excellent reports on 75m AM running "bare foot" 25W carrier power.

13 Nov 2021, I now have the JC-4s installed, and feeder length tuned for good matches on all bands, I used my RigExpert to do this so I can be sure that complex impedances the tuner sees are reasonable.

14 Nov 2021, I see Kuwait operating on 20m FT8, watched for a while no decodes. Checked again an hour or so later, decoding up to -6 dB, tried for 10 - 15 minutes with 80W, no luck. Hit it with 400W and completed the contact. I had to pick my self up off the floor when the RR73 appeared. From my location near Seattle, Kuwait is right over the north pole, middle of day here, night there. Unbelievable.

I'm suspiciously optimistic this antenna just seems to work better than all previous wire antennas I have used by a good margin (dipoles, trapped dipoles, OCFD), it keeps surprising me.

Actual readings taken with a RigExpert analyzer connected to the 1:1 ATU balun in doublet mode:

Band

R Ω

X Ω

SWR

10m

162.2

-93.9

4.4

12m

136.3

-114.1

4.8

15m

56.7

-178.6

13

17m

35.7

-163.1

17

20m

52.7

-259.6

28

30m

486.0

151.9

11

40m

102.4

-442.2

41

60m

98.1

109.8

4.7

75m

137.9

-445.6

32

80m

313.5

-659.6

34

160m

12.0

-141.9

38

This is with the antenna at a height of about 55 ft or 17 m, and approx 70 ft or 21 m of 600 ohm open wire line.

This shows me that the ATU has quite reasonable complex impedances to match, or no wild extremes at least.

R is a little low on 160m but at 130 ft or 40 m long the doublet is well too short at 1/4 wave length, but it does work no doubt with reduced efficiency. In T mode on 160m it would work much better as a DX antenna on transmit at least..

This also highlights the trap of assuming a 4:1 balun should be used, in nearly all cases this would lower the impedance too much. See Tuner Balun 4:1 or 1:1 for more about that.


Introducing the "All Band" Doublet - Cebik.

10 Frequency Asked Questions about the All-Band Doublet - Cebik.

Tuner Balun: 4:1 or 1:1? - G3TXQ.

80-Meter Doublet - KV5R.

Wednesday, August 11, 2021

QSL from RNZ Pacific

Once upon a time 30 something years ago when I first discovered shortwave radio the broadcast bands were filled with stations, a lot of them in english from various countries and interesting to listen to. These days it's hard to find any that are a) in english, and b) not religious.

Once in a while I'll tune around the short wave broadcast bands and see what's around. I got a nice surprise when I found Radio New Zealand Pacific on 13840 kHz (schedule here) a few days ago late in the afternoon. By evening it was quite strong at S9 +20dB with some QSB at my location near Seattle Washington all the way from New Zealand. Sure enough every day I checked I'd find it.

The target audience for RNZ Pacific are the Pacific Islands, but shortwave being shortwave it can go much further, especially with a good receiver and antenna, in my case the off center fed dipole at 55 ft.

I sent them an email, I got a reply and a link to request an eQSL card, which I received today.

RNZ Pacific QSL card

Screen capture from the Icom IC-7300

RNZ Pacific IC-7300 13.840

Again when they switch to 11725 kHz at 0500 UTC

RNZ Pacific IC-7300 11.725










Sunday, July 11, 2021

STREB VHF Compact Beam Revisited

The STREB VHF Compact Beam by Bert Looser ZL4IV is a 2m antenna which appeared in October 1992 BREAK-IN, the official amateur radio journal published by NZART (New Zealand Association of Radio Transmitters).

Article Page 1 and Page 2.


EZNEC STREB antenna view

A local ham and good friend Bill ZL1DEF (SK) gave me the temporary one he built to play around with sometime in 1994. The day I tried it out must have had some enhanced propagation as I could access a 2m repeater that was usually just out of reach with out help from a band lift. I thought wow, this antenna has the secret sauce I need!

I took it down and planned to build a weather proof version. That never happened and another friend of mine at the time commented probably a band lift, which I would later confirm since an 8 element NBS Yagi and 100W couldn't access or hear that repeater under normal conditions.

But this unique antenna never quite left my mind, getting back into ham radio around 2007 after a 10 year break the topic of this antenna came up while chatting on a local repeater and I was able to obtain copies of the two pages above.

Another 14 years later and having learned to model antennas over the last couple of years I decided it was time to model the STREB and take a closer look.

I created a model per the dimensions and tube thickness used in the article (6.4 mm or 1/4 inch) in EZNEC, the front to back ratio was low at around 10 dB, and resonance was well below the 2m band. Not sure why the discrepancy.

I contemplated trying to optimize it by hand, I've done this in the past with other antenna designs but the motivation didn't appear, so I decided to gain some experience with the the AutoEZ optimizer and put it to to work..

Well, blow my socks off! AutoEZ optimizer vastly improved the front to back, 20 dB or better across the 2m band, and moved the resonance to 146 MHz. The feed-point impedance came out around 135 ohms, using a section of 75 ohm coax to transform the impedance and wound on a toroid to also form a choke would bring that to 50 ohms with the SWR rising past 1.5:1 at the band edges according to EZNEC.

One change I made was aligning the two parasitic elements in the same plane in both models with a 50 mm spacing, the article has them either side of the RF cage (more or less a 1/2 wave dipole bent into a square fed at one corner), this didn't seem to do anything useful other than offset the pattern from the plane of the antenna.

See 2m-STREB for model files etc.

Article figure 5 measurements after AutoEZ optimization:

A =  959 mm (Director/front element)
B = 1013 mm (Reflector/rear element)
C =   62 mm (Gap between open ends of RF cage)
D =  270 mm (Height) x 209 mm (Length) (RF cage top half)
E =  271 mm (Length) x 270 mm (Height) (RF cage bottom half)


EZNEC STREB azimuth plot
Original vs optimized azimuth patterns in free space.


EZNEC STREB azimuth plot
Optimized azimuth patterns at 144, 146, and 148 MHz in free space.


EZNEC STREB elevation plot
Optimized elevation pattern 5 meters above real ground, vertical polarization

 

You might think, that's a mildly complicated antenna in an effort to reduce the size (but still poke your eye out with), and doesn't have a direct 50 ohm feed. What else is there? A Moxon rectangle has a similar size reduction, is simpler to build, direct 50 ohm feed, and are a well known tried and true design at this time. Interestingly both the STREB and Moxon appeared at about the same time.

Tuesday, May 25, 2021

First QSL Card

Well not quite, in the 90s I collected a large number of QSL cards from the CB radio days which I no longer have, I suspect I threw them out which I regret..

Yet somehow after near 30 years of being a ham I've never received a QSL card (or sent one)!

That changed recently when I heard special event station W5L on 20m SSB one afternoon commemorating the 218th anniversary of the Louisiana purchase.

I tried for a while to get through the pileup of other stations calling with my vertical doublet and 100W but had no luck, so I gave up and went back outside for a couple hours. Came back to the shack and W5L was still there calling for stations, and getting few responses so I gave a call and made the contact.

The QSL card I got back is a very nicely done folded card:

W5L QSL card
Front

W5L QSL card
Back


W5L QSL card
Inside half


Sunday, April 11, 2021

2m Horizontal Dipole Stack

Simple horizontally polarized antenna for 2m SSB. Two dipole stack 11 dBi at 5 degrees elevation (at 6m height). Build it in an afternoon..

Since I have an Icom IC-7100 in the shack which covers 2m and 70cm all modes, why not have a horizontally polarized antenna for some 2m SSB action? Most have Yagi's but with those comes the need for a rotator etc. This I built in an afternoon to try out with scrap items or stuff easily found at a hardware store - 75 ohm coax, some wire, screws, PCV tube etc.

An EZNEC model shows a horizontal dipole 6m / 20 ft above ground to have around 8 dBi gain with a bi-directional beam-width of 80 degrees, but it has a number of nearly equally strong high angle lobes which is a waste of energy going nowhere useful, and would also lower the SNR of desired signals.

I found stacking a second dipole 1m (1/2 wave length) above boosted the gain to 11.3 dBi and significantly reduced the overhead lobes. Feeding each dipole half way between with 75 ohm coax (0.5m each) resulted in a 44.4 J0 ohms match or an SWR of 1.12:1 where they meet in the middle, close enough for 50 ohm coax.

(not to scale)

EZNEC 2m 2 dipole stack elevation plot
Two dipole stack 6m / 20ft height above ground elevation plot


EZNEC 2m 2 dipole stack vs diple elevation plot
Two dipole stack 6m / 20ft height compared to a single dipole same height


EZNEC 2m 2 dipole stack azimuth plot
Two dipole stack azimuth plot


Model file: 2m 2 Dipole Stack.

I built this antenna in a couple of hours using some scrap PVC tube for the vertical mast, copper wire out of scrap Romex cable, scrap 75 ohm RG-6, and some sheet metal screws and washers. I also put a pair of snap on ferrites at the feed-point of each dipole, and also over the 50 ohm line leading away at the lower dipole.

2m 2 dipole stack test antenna photo

Seems to work alright, SWR meter in the IC-7100 reads 1:1 at the bottom of the 2m band, and rises slightly at the top/148 MHz.

On 440 MHz SWR around 1.6:1 works ok with the local FM repeaters.

Had a QSO with another station 20 miles away on 144.200, S9 each way. On the Comet GP-15 vertical which is a 2 x 5/8 on 2m they were S2.

Tuesday, April 6, 2021

Trying out FT8..

I got around to trying out FT8, the HF digital mode that everyone seems to be doing these days. I guess don't knock it until you try it..

It makes completing a contact very easy after setting some options.

Answering a CQ just double click station calling CQ, from there the process of your station answering, the exchange of callsigns, grid square and signal report are fully automated.

Calling CQ is simply clicking enable TX and waiting for others to answer, the same automated process takes over and completes the contact.

I can see this has it's uses with contesting, working a DX-Pedition under trying conditions to get that rare one for example since its simple, automated and completes a contact in five 15 second T/R sequences.

WSJT-X FT8 QSO

Here on the 17m band yesterday evening completed my very first ever FT8 contact with ZL2DD.

Monday, March 22, 2021

40 ft Vertical Doublet 40m - 10m

Vertical doublet / dipole - on 10m an EDZ (2x 5/8) with 4.5 dBi gain, 30m its just under a 1/2 wave dipole, and 40m a little on the short side but will work ok.

Started off with the idea of building an elevated vertical with radials to cover the upper HF bands, using an Icom AH-4 ATU at the feed-point to match it.

A 5/8 wave vertical for 10m is around 20 ft long, a 1/4 wave on 30m is around .. 23 ft. This would cover the upper HF bands. I like to model antennas before I build them for the experience and to get an idea of what to expect.

Modeling an elevated vertical trying different length radials didn't look so good, high angle lobes would form on some bands and the gain was mediocre at best. Running radials everywhere was not entirely convenient either.

I searched around for other possibilities, ZS6AAA designed a Compact Quad Multi Band HF Antenna which fits on a 40 ft Spiderbeam fiberglass pole that covers 40m through 10m. In my case easier said than done, needs to be guyed at several points.

Back to verticals, I thought delete the radials and center feed it? How long can I make it before the lobes go silly on 10m - the highest band? 40 ft. I was quite amazed at what I had discovered - only to find it was in-fact nothing new. However..

On 10m it's a vertical EDZ (Extended Double Zepp) or a 2 x 5/8 with 4.5 dBi gain at 10 degrees, and on 30 m it's just shy of a 1/2 wave dipole and 0.82 dBi with lowest point 10 ft above average ground.

40 ft vertical doublet AH-4 diagram

40 ft vertical doublet elevation plot

40 ft vertical doublet elevation plot

These patterns are much nicer than an elevated 1/4 or 5/8 wave ground plane antennas.


I have a 40ft Spiderbeam pole which I mounted on the 2nd level rear deck placing the bottom 10ft above ground. A surplus ZS6BKW I shortened the legs down to 20ft and keept the 40ft 450 ohm window line section as is, window line leads away at around 45 degree angle across to a roof eave where I mounted a short piece of PVC pipe with small section removed for the window line to fit over and rest on keeping it above the roof.

The first version (based on https://www.hamoperator.com/HF/AH-4_Design_and_Operation.pdf) I had the window line split between the output and ground terminal of the AH-4 tuner. CM chokes are placed on the coax and control cable. I used 3/4" mix 31 snap ons with enough turns of cable for a snug fit.

I later found using a 1:1 ATU balun between the AH-4 and balanced line worked a lot better. The AH-4 got better matches, and an RFI problem on 17m went away. The ATU balun was from Balun Designs. The CM chokes on the coax and control cable are still a good idea and were left in place in as well.

Made a 50ft control cable extension using quality CAT5e joining the pairs to make a 4 wire cable. I put a CAT5e tail with the RJ-45 left on (cut a patch cable in half) the tuner end and the end of the supplied control cable, lets me change the length by using CAT5 couplers and different length cable in-between.

I put a 3 Meg Ω 5W metal film resistor across the window line to bleed off static charge buildup via ground lug which is common to the coax shield in the tuner, coax shield is grounded where feed lines enter the house.


AH-4 photo40 ft vertical doublet photo


Pictures, taken before I added the 1:1 balun.

The AH-4 tunes all bands 80m to 6m no problem, but I would question the efficiency of this system below 40m.

Comparing it with my 80m OCFD at 55ft from my location near Seattle WA, the vertical does surprisingly well.

SSB: On 40m the OCFD is always better which is expected. On 20m and up the OCFD will pull out the weak signals a little better. Local nets on 10m where the vertical up-to 9 S-units better in some cases, I'm assuming others are using verticals on 10m.

On 6m the vertical has high angle lobes but works ok on local 6m FM repeaters, for better performance we could add 6m traps 5/8 wavelength (on 6m) down each leg which would make it a vertical EDZ on this band. Keeping in mind to account for the loading the traps add on HF, it may need to be shortened a little to keep 10m in check.

FT8: Running two instances of WSJT-X with two radios (IC-7100 on vertical, IC-7300 on OCFD) with one reporting my callsign with /P to make it easy to tell them apart on pskreporter and watching FT8 signals on 20m through 15m the OCFD hears around 20% more stations. There are a few cases both on SSB and FT8 where the vertical does better, likely in directions where the OCFD has a null. I should probably repeat the tests with the antennas swapped to see how much of that 20% is attributed to the IC-7300's SDR receiver..

Horizontal antennas 1/2 wavelength or more high are hard to beat due to the gain from ground reflections, this vertical is a close 2nd to the OCFD on the upper bands.

A permanent install would need to by guyed (using non conductive line) at the feed point with the window line supported / suspended from one - when the wind catches the window line things things start swinging and wobbling around more than I'd like.

Overall I'm quite pleased with this vertical, it's simple, light weight, no radials, and the results have surprised. Down sides are you need a good remote tuner, and a means to lead the window line away at 45 degree angle or higher if possible. In my case neither of these were an issue.

I can now also see why feeding balanced antennas with 450 ohm line to a good tuner is popular, it works well! Personally I've had little experience with this way of doing things.

A shorter version could also be used covering 17m to 6m, at 24 ft, it would be an EDZ on 6m, and just under 1/2 wave on 17m.

Related info:


Sunday, January 10, 2021

Forwarding Ports over OpenVPN

How to configure OpenVPN server to forward ports through to VPN clients.

I recently tested this setup with my Oracle Cloud free tier VM running Ubuntu 20.04 and OpenVPN server (setup using this script https://github.com/angristan/openvpn-install) to forward the ports used by my IRLP node (running on Debian 8) connected to the VPN. This would work with any type of service, it's just a matter forwarding the right tcp/udp ports, and configuring the VPN client to auto connect on startup.

ISPs are increasingly using CGNAT to deal with IPv4 address exhaustion, this is a problem for those of us that like to run systems or services that need to have ports forwarded into them from a publicly routable IP address to work. An example in ham radio circles are IRLP (Internet Radio Linking Project), EchoLink and AllStarLink which need ports forwarded in order to work. A number of the ham radio VoIP systems offer varying levels of support for VPNs from full service (IRLP - they send you a config and away you go with a publicly routed 44 address I believe) to supporting different providers to make the setup easy.

If you want to do it all your self using a free tier (no cost) Oracle cloud VM for the fun/experience/control (mwahaha) then this is how I did it. To setup an ad blocking VPN check out Setup free Cloud VPN with Ad Blocking (this is the primary purpose of my VPN setup).

There are four pieces to getting this working:

  1. OpenVPN client auto connect on startup.
  2. OpenVPN server assigns the same static VPN IP address to the client.
  3. Cloud networking config to allow the ports in to OpenVPN server host.
  4. Update iptables rules on the OpenVPN server host to forward the ports to the VPN client.

In this example I created a VPN client config (using the install script) with the CommonName IRLP1, and configured OpenVPN server to always assign it 10.8.0.10.

1. Configuring the client to auto connect VPN on startup


Created a passwordless client config and copied into /etc/openvpn on the client (not sure if this varies between Linux distros), the file needs to be renamed from .ovpn extension to .conf extension, or in my case I made a symlink: ln -s IRLP1.ovpn client.conf

Test that it connects from command line:
openvpn --client --config /etc/openvpn/client.conf
Ctrl C to disconnect.

To get OpenVPN client to connect on boot, I had to use information from several sources to get it working on Debian 8.

Edit /etc/default/openvpn uncomment AUTOSTART="all" 

Ran these commands:
systemctl daemon-reload
systemctl enable openvpn

Connect OpenVPN client/check status/disconnect:
systemctl start openvpn
systemctl status openvpn
systemctl stop openvpn

All things being equal, reboot the system and the OpenVPN client auto connects on system boot up.

Debian 8 had OpenVPN 2.3 installed, had to upgrade it to 2.4 to get it to work, this guide covers the steps.

2. Configuring OpenVPN server to assign a unique 10.8.0.x address to each unique client


Because we're going to create iptables rules to forward ports to specific IP addresses, the VPN client needs to receive the same VPN IP address every time, otherwise the port forwarding wont work if it gets a different address.

The OpenVPN server script I used includes the ifconfig-pool-persist ipp.txt option in /etc/openvpn/server.confOpenVPN server adds an entry to /etc/openvpn/ipp.txt the first time a new client connects in the format CommonName,10.8.0.x, this is used to maintain long term association between clients and IP addresses.

According to the OpenVPN reference manual, maintaining a long-term association is good for clients because it allows them to effectively use the persist-tun option. Note that the entries in this file are treated by OpenVPN as suggestions only based on past associations between a common name and IP address. They do not guarantee that the given common name will always receive the given IP address. If you want guaranteed assignment, use ifconfig-push.

For the clients we always want to have the same address assigned, added this line to /etc/openvpn/server.conf:

client-config-dir /etc/openvpn/ccd

Create a file in /etc/openvpn/ccd with common name of the client - in my case that's /etc/openvpn/ccd/IRLP1, and add this one line (the VPN IP address to assign and the netmask):

ifconfig-push 10.8.0.10 255.255.255.0

Edit ipp.txt to also match, e.g. IRLP1,10.8.0.10

What's not clear is if we need to keep ifconfig-pool-persist?


3. Updating the cloud networking config


Each cloud provider will be different. This is how to do it in Oracle Cloud.

Oracle Cloud Console > Networking > Virtual Cloud Networks > [network name you created] > Public Subnet > Default Security List:

Stateless

Source Type

Source CIDR

IP Protocol

Src Port Range

Dest Port Range

Type and Code

Description

No

CIDR

0.0.0.0/0

ICMP



Type 8

Allow PING

No

CIDR

0.0.0.0/0

TCP


15425


IRLP Control

No

CIDR

0.0.0.0/0

UDP


2074-2093


IRLP Audio



This opens the ports from the public internet to the cloud VM which is the first half. Allow ping isn't needed, but sometimes it's nice to be-able to ping the cloud VM.


4. Update iptables on OpenVPN server to forward the ports through to the VPN client


Different OpenVPN setup scripts can setup the iptables rules in different files/places. You'll need to read the script to see how it's being setup. In the case of the one I use linked above, it sets up a systemd script to call these two scripts:

/etc/iptables/add-openvpn-rules.sh
/etc/iptables/rm-openvpn-rules.sh

First one adds the OpenVPN related iptables rules when the OpenVPN server starts, the second removes them when OpenVPN server stops.

Examples that forward external port 22000 through to port 22 for SSH (not recommend to open SSH to the world any more than needed, but maybe useful to have in some cases), and the IRLP TCP control port, and UDP audio port ranges. ens3 is the VM's network interface name (change to suit where needed).

These commands add rules into iptables, these go in the add-openvpn-rules.sh script:

# SSH
iptables -t nat -A PREROUTING -p tcp -i ens3 --dport 22000 -j DNAT --to-destination 10.8.0.10:22
iptables -A FORWARD -p tcp -d 10.8.0.10 --dport 22 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

# IRLP TCP Control Port
iptables -t nat -A PREROUTING -p tcp -i ens3 --dport 15425 -j DNAT --to-destination 10.8.0.10:15425
iptables -A FORWARD -p tcp -d 10.8.0.10 --dport 15425 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

# IRLP UDP Audio Port Range
iptables -t nat -A PREROUTING -p udp -i ens3 --dport 2074:2093 -j DNAT --to-destination 10.8.0.10:2074-2093
iptables -A FORWARD -p udp -d 10.8.0.10 --dport 2074:2093 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

To put the added rules into effect, run the script.


These commands remove rules from iptables, these go in the rm-openvpn-rules.sh script:

# SSH
iptables -t nat -D PREROUTING -p tcp -i ens3 --dport 22000 -j DNAT --to-destination 10.8.0.10:22
iptables -D FORWARD -p tcp -d 10.8.0.10 --dport 22 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

# IRLP TCP Control Port
iptables -t nat -D PREROUTING -p tcp -i ens3 --dport 15425 -j DNAT --to-destination 10.8.0.10:15425
iptables -D FORWARD -p tcp -d 10.8.0.10 --dport 15425 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

# IRLP UDP Audio Port Range
iptables -t nat -D PREROUTING -p udp -i ens3 --dport 2074:2093 -j DNAT --to-destination 10.8.0.10:2074-2093
iptables -D FORWARD -p udp -d 10.8.0.10 --dport 2074:2093 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

Reboot the system to make sure the rules are applied on startup.

The above 3 sets of rules would cover most examples, such as mapping ports through on different port numbers, sometimes this is useful (SSH), a TCP rule for a single port (IRLP Control), and a UDP rule for a range of ports (IRLP Audio). Creating rules for the other amateur radio VoIP should be easy with those as examples.

iptables -L -v or iptables -S will show the rules.

Netcat is good for testing ports from Linux/macOS systems (-u is for UDP):
nc -z hostname_or_ip port_number
nc -zu hostname_or_ip port_number

Connecting to reflectors 9050, 9100, and 9109 which are quite busy for hours at times, and node to node connections have worked with out issue.

Thats it!


Bonus item, a script that'll reconnect the OpenVPN client if the tunnel is no longer up and the client for whatever reason failed to restart the tunnel.

Script looks at the exit code of the ping command, if it's anything other than 0 then the ping failed, and a reconnect is attempted.
Outputs one line to the IRLP log/messages file if it reconnects.

#!/bin/bash
# Test VPN tunnel by pinging remote endpoint, if down restart OpenVPN client.

IP='10.8.0.1'
LOGFILE='/home/irlp/log/messages'
LOGDATETIME=`date +"%b %d %Y %T %z"`

ping -W 1 -c 3 $IP 2>/dev/null 1>/dev/null
if [ ! "$?" = 0 ]; then
 echo "$LOGDATETIME VPN tunnel down reconnecting.." >> $LOGFILE
 systemctl restart openvpn
fi

Put that into a file say called /home/irlp/custom/vpn-check.sh

Make it executable: chmod +x vpn-check.sh

As root edit the crontab: crontab -e

Add this line:

*/5 * * * * /home/irlp/custom/vpn-check.sh >/dev/null 2>&1

That'll run the script every 5 minutes.

Tuesday, January 5, 2021

Receive Antenna RDF Metric

Receiving Directivity Factor (RDF) helps determine the performance of antennas on receive, this is useful with lower HF bands under 10 MHz where noise becomes an increasing problem. RDF is the difference between the peak forward gain and averaged gain in all directions.

RDF value can be calculated using an EZNEC model:

  • Set plot type to 3D, click FF Plot, average gain displayed at the bottom of EZNEC window.
  • In the 3D Plot window click View > Show 2D Plot, the peak forward gain is displayed.
  • Subtract peak gain from average gain, this is the RDF figure.

Here's an example using a LoG (Loop on Ground) phased array I modeled:

EZNEC antenna RDF metric
Click for lager image

Average gain -37.06 dB minus peak gain -28 dBi = RDF of 9.06 dB, which in the world of RDF and receive antennas is respectable.

Reason I post this, is it's easy to find pages discussing RDF and figures of various antennas, but only two places I found mention how to calculate it - Receiving Basics and The Challenge: Receiving Antennas.

More about The RDF Metric.




More can be found by searching for Antenna RDF or Receiving Directivity Factor.