What's new

YazFi YazFi and Port forwarding to get to server?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

robmash

New Around Here
Hi all,

I am using YazFi to host some IOT devices on a wifi network isolated from my main network. I have just started tinkering with HomeAssistant, which is running on my main network. I have the IOT network configured to allow one-way comms from the main network to the IOT network, but not the other way around. However, with HomeAssistant devices need to push/post data to the server, which is not permitted.

I tried using the 'port forwarding' setting in my Asus router (RT-AC68U) to forward the HomeAssistant port (8123) to my HA server. For security, I limited the source port to the sending IP address (ie: the device on the IOT network). After I configured this, it worked... for a while. Following a reboot, this no longer works.

I have two questions:
1) Is YazFi meant to work with Port Forwarding this way, or was it just a weird anomaly that I got it working temporarily?
2) Can I allow an entire subnet (/24) in the 'source ports' field?
 
Update: After some reading I discovered that YazFi can support custom firewall/routing rules. So, I have now added an IP TABLES entry to permit 2-way traffic to the HA IP address (and port, as it is on a server running other services).
 
For those reading who are new to YazFi, see the YazFi section on Custom Firewall Rules.
https://github.com/jackyaz/YazFi?tab=readme-ov-file#custom-firewall-rules

There are a number of previous posts that discuss using YazFi custom firewall rules to allow access between main LAN clients and YazFi clients. For example one such post with examples of configuring access between main LAN and YazFi clients.
https://www.snbforums.com/threads/allowing-access-to-selected-network-devices.80405/#post-784521

One can use the forum search feature (or filter option) to find other past discussions on YazFi.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top