Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AP+STA mode and network isolation #20

Merged
merged 3 commits into from Jun 22, 2022

Conversation

mrdis
Copy link

@mrdis mrdis commented Dec 4, 2021

Hi! Thanks for your great add-on!
I spent a little time implementing support for wifi AP+STA mode, and AP network isolation.
This is useful for me since my HASS is connected to the home network via wi-fi, but I would like to connect some devices that I don't trust in an isolated internet-connected wi-fi network.
With this solution I get this functionality, and maybe others can find it useful too.

@hellresistor
Copy link

hellresistor commented Dec 19, 2021

With this PR. is possible replicate eth0 ips to wlan0 connected clients, with same network ip?
The router will manage the ips o0.
I have tried some PR's but no one working :| or I am using wrong :|
sorry my worst english

@iosoft
Copy link

iosoft commented Jun 18, 2022

I am also looking for this option.
Keep it up.

@mattlongman
Copy link
Owner

Hi @mrdis - apologies for the delay in getting to this.

I've made a couple of changes to your branch, looking to test and make a few more changes this week.

The iptables cleanup is good, but if for any reason the function doesn't get called, a duplicate entry will be created when the addon next starts up, which ultimately means, next time cleanup_iptables runs, the single iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE command will only remove one line.

I've done some initial testing and I can remove all applicable entries with:

iptables-save | grep -v "MASQUERADE" | iptables-restore

Feel free to disagree or suggest a better way of doing this!

@mattlongman mattlongman changed the base branch from main to dev-0.5 June 22, 2022 09:51
@mattlongman mattlongman merged commit 8582131 into mattlongman:dev-0.5 Jun 22, 2022
@mattlongman
Copy link
Owner

Merged into https://github.com/mattlongman/Hassio-Access-Point/tree/dev-0.5 to allow for further testing and updates. @mrdis, please feel free to submit further PRs to this branch.

@mattlongman mattlongman mentioned this pull request Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants