<![CDATA[Ronson's Blog]]>https://blog.ronsonchan.com/https://blog.ronsonchan.com/favicon.pngRonson's Bloghttps://blog.ronsonchan.com/Ghost 6.80Thu, 03 Dec 2026 21:31:45 GMT60<![CDATA[Shop app is the scum of payments]]>Paypal is not great, but shop and shopify are the scum of payment options.

Even Paypal offers an optin to choose your own currency exchange method.

Shop app? none. Let's just steal 5% off every transaction

]]>
https://blog.ronsonchan.com/shop-app-is-the-scum-of-payments/6b09aa7b6c71a500015e3e08Fri, 27 Nov 2026 16:07:29 GMTPaypal is not great, but shop and shopify are the scum of payment options.

Even Paypal offers an optin to choose your own currency exchange method.

Shop app? none. Let's just steal 5% off every transaction

]]>
<![CDATA[Splitting Costco and Amazon transactions in Actual Budget]]>What Gets Measured Gets Done

This weekend I vibe coded a simple web app to sync receipt item level data into Actual Budget

It utilizes:

Used Google Antigravity mainly because I had free credits and

]]>
https://blog.ronsonchan.com/splitting-costco-and-amazon-transactions-in-actual-budget/69d5247da8b29800011c1a20Tue, 07 Apr 2026 21:00:03 GMT

What Gets Measured Gets Done

This weekend I vibe coded a simple web app to sync receipt item level data into Actual Budget

It utilizes:

Used Google Antigravity mainly because I had free credits and it got the job done.

Now I can take Costco and Amazon receipts, break them down into individual items, and map them into categories automatically.

No more single line transactions. Everything is itemized and visible.

What gets measured gets done

]]>
<![CDATA[Cineplex Locked My Account Because Someone Failed To Break In]]>I received an email from Cineplex telling me my account was locked after three unsuccessful login attempts. Not because I did anything wrong. Not because anyone actually got in. But because someone tried and failed.

And now I have to reset my password.

Here is why this is a bad

]]>
https://blog.ronsonchan.com/cineplex-locked-my-account-because-someone-failed-to-break-in/6921cb59deb01700015802e6Sat, 22 Nov 2025 14:47:54 GMTI received an email from Cineplex telling me my account was locked after three unsuccessful login attempts. Not because I did anything wrong. Not because anyone actually got in. But because someone tried and failed.

And now I have to reset my password.

Here is why this is a bad security practice.

It punishes the user for nothing.
If someone else mistypes my email or tries a random password, I should not be the one doing extra work. A simple notification would be enough.

A failed login means the password is working.
Three failed attempts usually indicate the account is safe. The system did its job. Forcing a reset suggests the opposite of what actually happened.

It goes against normal security standards.
Most services simply notify you and rate limit suspicious attempts. They do not lock the owner out. They only force a reset if there is evidence of compromise.

It encourages weak habits.
Frequent resets push people toward simpler passwords, repeated passwords or unsafe storage. This lowers security instead of improving it.

It does nothing to stop real attackers.
Serious attackers do not stop at three tries. They use bots, distributed IPs and automation. A forced reset after three human attempts is security theatre, not protection.

Cineplex means well, but this policy creates inconvenience, teaches bad habits and misunderstands the actual threat. At minimum, users should be given the choice to reset or continue.

Someone failing to break into my account should not result in me being locked out.

]]>
<![CDATA[CoderPad example is wrong]]>Source: https://coderpad.io/interview-questions/postgresql-interview-questions/

The question says that there is an error when you run the query. However, this is not true.

This code runs perfectly fine.


SELECT e.id, e.first_name, e.last_name, e.salary, e.department_id
FROM employees e
JOIN
]]>
https://blog.ronsonchan.com/coderpad-example-is-wrong/68a6320627adf60001db8c68Wed, 20 Aug 2025 20:45:07 GMTSource: https://coderpad.io/interview-questions/postgresql-interview-questions/

The question says that there is an error when you run the query. However, this is not true.

This code runs perfectly fine.


SELECT e.id, e.first_name, e.last_name, e.salary, e.department_id
FROM employees e
JOIN (SELECT department_id, AVG(salary) AS avg_salary
    FROM employees
    GROUP BY department_id) d
ON e.department_id = d.department_id
WHERE e.salary > d.avg_salary;

Why? because the subquery does not need to be aliased.

Execution of his query should be

  1. Suquery runs first. All columns required are in the query, there are no ambiguous columns because it's all from one table
  2. The subquery is aliased as "d"
  3. The query will then JOIN the two tables together
  4. The query will then filter out any rows based on the WHERE clause

]]>
<![CDATA[The Story Tells the Data – Part 3]]>The Analyst Gets Access and Observes the Source System

Eventually, someone gives you access to the system. You log in and see it for the first time—not the dashboard, not the warehouse table, but the actual place where the data is born.

Suddenly, things start to click. That

]]>
https://blog.ronsonchan.com/the-story-tells-the-data-part-3/6866f043d9c9400001f6d67eFri, 08 Aug 2025 04:00:53 GMT

The Analyst Gets Access and Observes the Source System

Eventually, someone gives you access to the system. You log in and see it for the first time—not the dashboard, not the warehouse table, but the actual place where the data is born.

Suddenly, things start to click. That “active” flag? It’s only set when a user logs in for the first time. The "status_updated_at" timestamp? It’s overwritten on every status change, not appended. The reason signups drop to zero at midnight? There’s a daily reset job that quietly fails on Sundays.

Once you see how the system works, everything downstream starts making more sense. You're not just querying data anymore; you’re tracing its life cycle. You stop taking fields at face value. You stop assuming the pipeline always works. You stop trying to force a story out of incomplete information.

This is what separates good analysts from great ones. The great ones get curious. They walk over to the engineer and ask how a table gets filled. They sit with the ops team and watch what happens when a ticket is closed. They don’t just look at the data—they learn where it comes from.

Three things that make a huge difference:

  1. Shadow someone who uses or manages the system. Even 15 minutes can reveal things you’d never guess from the schema.
  2. Map out the data flow. Tools like dbt docs or even a whiteboard help connect the dots.
  3. Build a glossary of “gotchas.” Track the quirks—fields that lag, columns that mean something different than their name.

If you’ve ever been frustrated by confusing or inconsistent data, you’re not alone. But the more you understand the source, the less time you’ll spend guessing—and the more your insights will actually reflect reality.

]]>
<![CDATA[The Story Tells the Data - Part 2]]>The Data Told a Story, But It Didn’t Make Sense

You build the dashboard. It looks clean, runs fast, and the numbers check out—until someone asks, “Why are weekend sales always zero?” You look again. It’s not a rounding issue. The data

]]>
https://blog.ronsonchan.com/the-story-tells-the-data-part-2/6866eed3d9c9400001f6d676Tue, 22 Jul 2025 19:53:32 GMT

The Data Told a Story, But It Didn’t Make Sense

You build the dashboard. It looks clean, runs fast, and the numbers check out—until someone asks, “Why are weekend sales always zero?” You look again. It’s not a rounding issue. The data literally stops every Friday at 5 PM and picks up again Monday morning.

You’ve just met one of the most frustrating issues in analytics: when the data tells a story, but it’s not the right one.

This happens more than people think. A pipeline runs late. A data source is archived but still queried. A field is renamed but never updated in downstream jobs. From the analyst’s perspective, everything looks logical. The query runs. The numbers line up. The story makes sense. But it’s fiction.

It’s not that the tools are broken. The tools are doing exactly what they’re told. The problem is the data doesn’t reflect reality. And if you don’t catch it, decisions get made based on patterns that aren’t real—like assuming customers don’t shop on weekends when really, the ingest job is scheduled Monday at 2 AM.

Here’s how to keep this from happening:

  1. Sanity check edge cases. Look at time series for sudden drop-offs or regular gaps.
  2. Ask, “Where does this data come from, and when does it land?” Timing matters more than most people think.
  3. Trace one real-world example end to end. If a user signs up today, can you follow that event through to the report?

In the next post, we’ll look at what changes when the analyst gets direct access to the source system—and finally sees how the data is created in the first place.

]]>
<![CDATA[Causal.app - Sourcing from BigQuery and creating dimension links]]>A short reminder to self, you can create Dimension Links using a BigQuery source if you label the columns with >

Example:

select country, region as "country > region", amount from table

]]>
https://blog.ronsonchan.com/causal-app-sourcing-from-bigquery-and-creating-dimension-links/6877ac285ddf050001c08cabWed, 16 Jul 2025 13:43:35 GMTA short reminder to self, you can create Dimension Links using a BigQuery source if you label the columns with >

Example:

select country, region as "country > region", amount from table

]]>
<![CDATA[Causal.app Does Not Balance]]>You set up your model in Causal.app connected it to your Accounting System and now you want to create a Balance Sheet.

A few buttons later, you've got one! Unfortunately, it doesn't balance.

As of July 16, 2025, Causal has two "features" that

]]>
https://blog.ronsonchan.com/causal-app-does-not-balance/6877a78c5ddf050001c08c7fWed, 16 Jul 2025 13:41:42 GMTYou set up your model in Causal.app connected it to your Accounting System and now you want to create a Balance Sheet.

A few buttons later, you've got one! Unfortunately, it doesn't balance.

As of July 16, 2025, Causal has two "features" that you wouldn't expect

  1. Deleted accounts are not included in the data import
  2. Your accounting system, like Xero, automatically places BANK ACCOUNTS into ASSETS but understands that a Line of Credit with a negative balance is a LIABILITY

To handle #1, you need to have an alternative source like Google sheets with all the deleted GL Accounts. You could also probably connect it to BigQuery in which case you might as well set up all the calculations in your dataset and then import into Causal

To handle #2, you can create a formula like below that zeroes it out in the ASSETS section and then a similar formula in the LIABILITIES that places it back in.

]]>
<![CDATA[The Story Tells the Data - Part 1]]>When the Analyst Doesn’t Understand the Data

There’s a common phrase in analytics: “The data tells a story.” That’s nice in theory, but in practice, the story being told depends entirely on whether the analyst actually understands the data they’re

]]>
https://blog.ronsonchan.com/the-story-tells-the-data-part-1/68668b3ad9c9400001f6d668Fri, 04 Jul 2025 14:35:06 GMT

When the Analyst Doesn’t Understand the Data

There’s a common phrase in analytics: “The data tells a story.” That’s nice in theory, but in practice, the story being told depends entirely on whether the analyst actually understands the data they’re looking at. And often, they don’t.

It’s not always the analyst’s fault. You get dropped into a new environment with five years of data, thousands of columns, and no documentation. You’re told to build a dashboard, explain why churn is up, or find something “insightful.” So you do what you can. You click around in a BI tool, run some queries, and start pulling numbers. Everything looks fine—until someone from the product or engineering team tells you that column doesn’t mean what you think it does. Or that the data is stale. Or that it’s not even used anymore.

The problem is that most analysts start with exploration before context. But in systems with real operational complexity, column names don’t always match what’s actually happening in the source application. “Status = active” might mean the user clicked a checkbox once three years ago. A timestamp might be when a job last ran, not when the event actually occurred. Without understanding how the data is created and used, you’re just guessing.

If this sounds familiar, don’t worry—it’s fixable. The goal of this series is to walk through the common traps analysts fall into, how to recognize them, and what to do instead.

Here are three things that help right away:

  1. Talk to the people who built or use the system. Ask what each field means in practice—not just what the label says.
  2. Don’t assume nulls or zeros mean “nothing.” They often mean “something went wrong” or “data never landed.”
  3. Write down your assumptions before building reports. Even a short bullet list can help catch misunderstandings early.

In Part 2, I’ll cover what happens when the data does tell a story—but it’s the wrong one.

]]>
<![CDATA[Airbyte Connector Update Error - Failed to fetch ...]]>

When adding a custom connector on Airbyte OSS, you may run into an error that says "Something went wrong".

Example:
- https://github.com/airbytehq/airbyte/issues/23716

To determine what's actually go wrong, you can do the following:

  1. Connect to the airbyte db
  2. Update the actor_
]]>
https://blog.ronsonchan.com/airbyte-connector-update-error-failed-to/65ae8aa1944b8a00015bb730Mon, 22 Jan 2024 22:38:47 GMT

When adding a custom connector on Airbyte OSS, you may run into an error that says "Something went wrong".

Example:
- https://github.com/airbytehq/airbyte/issues/23716

To determine what's actually go wrong, you can do the following:

  1. Connect to the airbyte db
  2. Update the actor_definition_version table with the connector version you're having trouble with
    Example:
\c airbyte; --Connect to airbyte db

-- Update to your connector version
UPDATE actor_definition_version 
SET docker_image_tag = '0.2.2' 
WHERE actor_definition_id = '8e410e19-e5b9-4152-a892-a78847331ee3';
  1. Refresh your Airbyte source connector page to see if it got updated to the docker_image_tag version you force.
  2. Try to run a sync
    1. It should not show you the error that's causing the problem. Below is an example of the error I got:
2024-01-22 15:34:44 INFO i.a.w.i.VersionedAirbyteStreamFactory(create):177 - Reading messages from protocol version 0.2.0
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 - Traceback (most recent call last):
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/airbyte/integration_code/main.py", line 12, in <module>
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     source = SourceMixpanelExport()
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/airbyte/integration_code/source_mixpanel_export/source.py", line 18, in __init__
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     super().__init__(**{"path_to_yaml": "manifest.yaml"})
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/yaml_declarative_source.py", line 20, in __init__
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     source_config = self._read_and_parse_yaml_file(path_to_yaml)
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/yaml_declarative_source.py", line 28, in _read_and_parse_yaml_file
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     return self._parse(decoded_yaml)
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/yaml_declarative_source.py", line 42, in _parse
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     return yaml.safe_load(connection_definition_str)
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/yaml/__init__.py", line 125, in safe_load
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     return load(stream, SafeLoader)
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/yaml/__init__.py", line 81, in load
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     return loader.get_single_data()
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/yaml/constructor.py", line 49, in get_single_data
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     node = self.get_single_node()
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/yaml/composer.py", line 36, in get_single_node
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     document = self.compose_document()
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/yaml/composer.py", line 55, in compose_document
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     node = self.compose_node(None, None)
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/yaml/composer.py", line 84, in compose_node
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     node = self.compose_mapping_node(anchor)
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/yaml/composer.py", line 127, in compose_mapping_node
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     while not self.check_event(MappingEndEvent):
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/yaml/parser.py", line 98, in check_event
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     self.current_event = self.state()
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   File "/usr/local/lib/python3.9/site-packages/yaml/parser.py", line 438, in parse_block_mapping_key
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     raise ParserError("while parsing a block mapping", self.marks[-1],
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 - yaml.parser.ParserError: while parsing a block mapping
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   in "<unicode string>", line 1, column 1:
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     spec:
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -     ^
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 - expected <block end>, but found '<block mapping start>'
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -   in "<unicode string>", line 229, column 5:
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -         incremental_sync:
2024-01-22 15:34:45 ERROR i.a.c.i.LineGobbler(voidCall):149 -         ^
]]>
<![CDATA[Duplicacy Add (Copy) Backup to Another Provider]]>Barebones instructions that makes leap of faith understanding: https://forum.duplicacy.com/t/back-up-to-multiple-storages/1075

Assumptions:

  • You already have a backup in Duplicacy Initialized and have backed up in the past
  • You've set the PATH for your Duplicacy executable so it can be accessed
]]>
https://blog.ronsonchan.com/duplicacy-add-copy-backup-to-another-provider/64c5523eee44220001291898Sat, 29 Jul 2023 18:05:41 GMTBarebones instructions that makes leap of faith understanding: https://forum.duplicacy.com/t/back-up-to-multiple-storages/1075

Assumptions:

  • You already have a backup in Duplicacy Initialized and have backed up in the past
  • You've set the PATH for your Duplicacy executable so it can be accessed easily from any folder

High Level:

  1. Add another storage location for your backups
  2. Add a dummy version of the backup with a different ID - used to backup your current data, and then fill it back up with the missing pieces from your original
  3. Backup your current AKA local data to the "dummy" one first
  4. Now copy the old back up to the new one.  Since you did (3), only incremental data from your original backup will be copied to the new location.  This saves you from having to copy everything from your original backup and re-uploading it to the new backup.  i.e. it saves you the download assuming you have some of the data locally

Details:

Variables - rename them to whatever you want:

  • Real Storage Name: RNS
  • Real Storage ID: rns1
  • Dummy Storage Name: DUMMY
  • Dummy Storage ID: dummy1
  • New backup provider: wasabi://bucket
  1. Go to the root of the folder of data you want to backup.  It should be the folder with the .dulicacy directory
  2. run: duplicacy add -e -copy default -bit-identical RNS rns1 wasabi://bucket
  3. run: duplicacy add -e -copy default -bit-identical DUMMY dummy1 wasabi://bucket wasabi://bucket
  4. Assuming you are already backing up to your original default backup location, you want to backup your local data to the dummy location first
  5. run duplicacy backup -storage DUMMY
  6. Once that's completed, you will now copy all the missing backup pieces from your original location to the new dummy location
  7. run duplicacy copy -from default -to RNS
  8. Once that's complete, you can schedule backups to default and RNS
]]>
<![CDATA[Connecting Roomba to WiFi (Android)]]>
  • Factory reset your Roomba
  • Set up your Roomba
  • App will say successfully connected, Roomba will still be blinking Green
  • Turn off Roomba by holding the clean button
  • Turn on Roomba and it should not be connected to Wifi
  • ]]>
    https://blog.ronsonchan.com/connecting-roomba-to-wifi/646ce89211e84b0001dea029Tue, 23 May 2023 21:31:40 GMT
  • Factory reset your Roomba
  • Set up your Roomba
  • App will say successfully connected, Roomba will still be blinking Green
  • Turn off Roomba by holding the clean button
  • Turn on Roomba and it should not be connected to Wifi
  • ]]>
    <![CDATA[OpenWRT + Failover with mwan3]]>

    I wanted to create a backup connection to my network in case my main OPNSense firewall went down.  I only want the backup connection online, if the main one goes offline.

    1. Setup OpenWRT on RPi3
    2. Installed mwan3
    3. Tried to follow the guide in OpenWRT Wiki
    4. Nothing about how to
    ]]>
    https://blog.ronsonchan.com/openwrt-failover-with-mwan3/629d212069382d000103e290Sun, 05 Jun 2022 21:45:07 GMT

    I wanted to create a backup connection to my network in case my main OPNSense firewall went down.  I only want the backup connection online, if the main one goes offline.

    1. Setup OpenWRT on RPi3
    2. Installed mwan3
    3. Tried to follow the guide in OpenWRT Wiki
    4. Nothing about how to set up Failover with the second link off

    How to:

    1. Set up both interfaces for WAN. In my case, VLAN 10 through my internal network as the main connection and (wan) and VLAN 110 directly to my ISP for failover (wanb)
    2. For wanb interface, uncheck Bring up on boot

    3. In the mwan3 config file or via the GUI, set the initial_state of the failover (wanb) connection to offline

    4. Modify the mwan3.user file to turn on the interface (wanb) when main connection goes down, and to turn it back off when main connection is online.  I haven't fully tested the below, so I have it set to turn off the connection if there is an ifup event or connected event on the main connection(wan)

    /etc/mwan3.user

    #!/bin/sh
    if [ "${ACTION}" = "disconnected" ] && [ "${INTERFACE}" = "wan" ] ; then
        ifup wanb
       /etc/init.d/ddns restart
    fi
    if [ "${ACTION}" = "connected" ] && [ "${INTERFACE}" = "wan" ] ; then
        ifdown wanb
        /etc/init.d/ddns restart
    fi
    if [ "${ACTION}" = "ifup" ] && [ "${INTERFACE}" = "wan" ] ; then
        ifdown wanb
        /etc/init.d/ddns restart
    fi

    mwan3 config file for reference

    /etc/config/mwan3

    config globals 'globals'
            option mmx_mask '0x3F00'
            option logging '1'
            option loglevel 'info'
    
    config interface 'wan'
            option enabled '1'
            list track_ip '1.1.1.1'
            option family 'ipv4'
            option initial_state 'online'
            option track_method 'ping'
            option reliability '1'
            option count '1'
            option size '56'
            option max_ttl '60'
            option check_quality '0'
            option timeout '4'
            option interval '10'
            option failure_interval '5'
            option recovery_interval '5'
            option down '5'
            option up '5'
            list flush_conntrack 'ifup'
    
    config interface 'wanb'
            list track_ip '8.8.4.4'
            list track_ip '8.8.8.8'
            option family 'ipv4'
            option reliability '1'
            option enabled '1'
            option initial_state 'offline'
            option track_method 'ping'
            option count '1'
            option size '56'
            option max_ttl '60'
            option check_quality '0'
            option timeout '4'
            option interval '10'
            option failure_interval '5'
            option recovery_interval '5'
            option down '5'
            option up '5'
            list flush_conntrack 'ifup'
    
    config member 'wan_m1_w3'
            option interface 'wan'
            option metric '1'
            option weight '100'
    
    config member 'wanb_m2_w2'
            option interface 'wanb'
            option metric '2'
            option weight '2'
    
    config policy 'wan_wanb'
            list use_member 'wan_m1_w3'
            list use_member 'wanb_m2_w2'
    
    config rule 'default_rule_v4'
            option dest_ip '0.0.0.0/0'
            option family 'ipv4'
            option proto 'all'
            option sticky '0'
            option use_policy 'wan_wanb'
    

    Useful References:

    ]]>
    <![CDATA[OPNSense Selective Routing for Specific Networks (Websites)]]>

    Goal:  Route specific websites through Wireguard VPN tunnel

    Caveat: With the use of CDNs, this doesn't work really well.  i.e. the CDN redirects you to different IPs, and each time you resolve the domain, it gets a different IP, so it doesn't always

    ]]>
    https://blog.ronsonchan.com/opnsense-selective-routing-for-specific-networks-websites/6212ce6d2758810001b8ced7Sun, 20 Feb 2022 23:44:24 GMT

    Goal:  Route specific websites through Wireguard VPN tunnel

    Caveat: With the use of CDNs, this doesn't work really well.  i.e. the CDN redirects you to different IPs, and each time you resolve the domain, it gets a different IP, so it doesn't always get routed through the VPN tunnel

    References: https://joris.bearblog.dev/opnsense-wireguard/

    Follow the instructions from OPNsense & WireGuard: Tunnel Devices through VPN to do the following:

    1. Configure & Enable WireGuard (External Link)
    2. Assign the WireGuard interface (External Link)
    3. Tweak WireGuard Gateway settings (External Link)
    4. Add manual NAT rule for the WireGuard Interface (External Link)
    5. Create an Alias for Sites/Networks you want to route through the VPN tunnel
    6. Similar to Add firewall rules to route certain devices to the WireGuard Gateway, we are going to create a firewall rule to route all clients to the Wireguard gateway if the destination is in the Alias we created in (5)
      Click the orange [+] -> and then add the Alias as the Destination in the rule, change the Gateway to your new Wireguard VPN Gateway.
      Then move the rule near the top of the list so that requests will hit that rule before your other rules.
    ]]>
    <![CDATA[Fibrestream + VLAN = Packet Loss by LLDP]]>TL;DR If you use Fibrestream as your ISP and put it on a VLAN, make sure the port it's connected to has LLDP disabled.  If not, you'll have constant packet loss.

    Fibrestream is my ISP and they provide internet over CAT5 DHCP.

    With more

    ]]>
    https://blog.ronsonchan.com/fibrestream-vlan/6071f63aab14af00016bb6b4Sat, 10 Apr 2021 19:25:04 GMTTL;DR If you use Fibrestream as your ISP and put it on a VLAN, make sure the port it's connected to has LLDP disabled.  If not, you'll have constant packet loss.

    Fibrestream is my ISP and they provide internet over CAT5 DHCP.

    With more time on my hands, I wanted to set up VLANs for my network and also virtualize my router.  It's currently baremetal pfsense.  

    My switch: Ruckus ICX7150-C12P  

    Useful links for the switch:

    Initially, everything worked great.  Physical connection was as follows:

    • Fibrestream was connected to port 1/1/12 of the switch
    • pfsense was connected to ports 1/2/1 and 1/2/2
    • Ports 1/1/12 and 1/2/2 were in their own VLAN for WAN

    Then, everything broke when I added/replaced the R310 with a R710.

    The R710 requires more power, so as I was fiddling with the switch, I turned on LLDP globally.  By default, on firmware 08080e, LLDP is not on for all ports.

    #turn on LLDP globally
    device(config)#lldp run

    What happened?  Every 15 minutes, my pfsense would encounter packet loss and drop connections.  This was a nightmare for working from home and video conferencing.

    The fix? disable LLDP on the port that goes into the switch from Fibretream

    device(config)#no lldp enable ports ethernet 1/1/12
    ]]>