t123thomas 63 Posted March 5, 2023 Posted March 5, 2023 (edited) Hi if anyone can assist, my emby server is on subnet 192.168.1.1/24, In my DDWRT router I have a separated the guest by diff bridge br1 subnet (192.168.2.1/24) I have test every possible connections to determine that guest access is limited to 192.168.2.1, it works except for emby server which on 192.168.1.105:8096 Any thoughts on how to prevent guest from accessing emby on subnet 192.168.1.1/24 port 8096. Edited March 5, 2023 by t123thomas
GrimReaper 4749 Posted March 5, 2023 Posted March 5, 2023 Have you tried forcing only 192.168.1.1/24 subnet as local and then Blacklist filtering subnet 192.168.2.1/24 as remote? 1
Happy2Play 9783 Posted March 5, 2023 Posted March 5, 2023 Was just typing that. Or Firewall changing local scope. 1
rbjtech 5284 Posted March 5, 2023 Posted March 5, 2023 (edited) Err... the entire point of a 'Guest' network is for them to NOT have access to any other local LAN network. You appear to be doing this the wrong way around. You should block everything (by default, no need for a firewall - the two networks should not be 'bridged') - and then use the 'firewall' as a 'router' to cross the networks. ie if you just enable a f/w rule from 192.168.2.0/24 (ie all the Guest Network) to 192.168.1.x (emby server IP) on port 8096 - then they can connect to emby (and ONLY emby - nothing else). If you did want to just bridge the networks (for some reason, maybe you just want it for a separate AP? ) - then a simply f/w rule to drop traffic from the Guest source network (192.168.2.0/24) to the emby IP destination is also a way to achieve this - as said above. Make sure this appears before any other rules. Edited March 5, 2023 by rbjtech
t123thomas 63 Posted March 5, 2023 Author Posted March 5, 2023 7 hours ago, rbjtech said: Err... the entire point of a 'Guest' network is for them to NOT have access to any other local LAN network. You appear to be doing this the wrong way around. You should block everything (by default, no need for a firewall - the two networks should not be 'bridged') - and then use the 'firewall' as a 'router' to cross the networks. ie if you just enable a f/w rule from 192.168.2.0/24 (ie all the Guest Network) to 192.168.1.x (emby server IP) on port 8096 - then they can connect to emby (and ONLY emby - nothing else). If you did want to just bridge the networks (for some reason, maybe you just want it for a separate AP? ) - then a simply f/w rule to drop traffic from the Guest source network (192.168.2.0/24) to the emby IP destination is also a way to achieve this - as said above. Make sure this appears before any other rules. Thanks for your thought, I am no expert in iptable fire chain, I have search various sites on this subject if I will get a scripts but no luck. My router firmware is ddwrt appreciate if someone's can write the iptable rules that prevent the guest 192.168.2.1/24 from 192.168.1.1/24 while the guest can access internet. Thanks
Happy2Play 9783 Posted March 5, 2023 Posted March 5, 2023 Does your guest network have "Wireless Isolation" option? Could have may other isolation names though.
t123thomas 63 Posted March 5, 2023 Author Posted March 5, 2023 1 hour ago, Happy2Play said: Does your guest network have "Wireless Isolation" option? Could have may other isolation names though. Yes
t123thomas 63 Posted March 5, 2023 Author Posted March 5, 2023 (edited) 2 hours ago, t123thomas said: Yes Here is my Iptable rules, what seem to be the issue is the forward rules, when I removed it local guest was not able able to access emby However, I the the portforward rules are needed for external client to access emby server Any idea on how to rewrite the rules? Otherwise I will use emby blacklist rules iptables -I FORWARD -i br0 -o br1 -j ACCEPT iptables -I FORWARD -i br1 -o br0 -m state --state RELATED.ESTABLISED -j ACCEPT iptables -I FORWARD -i br1 -o br0 -j DROP ext_port=8096 int_port=8096 int_ip=192.168.1.104 iptables -t nat -I PREROUTING -p tcp -d $(nvram get oet1_ipaddr) --dport $ext_port -j DNAT --to $int_ip:$int_port iptables -I FORWARD -p tcp -d $int_ip --dport $int_port -j ACCEPT Edited March 5, 2023 by t123thomas
rbjtech 5284 Posted March 6, 2023 Posted March 6, 2023 8 hours ago, t123thomas said: Here is my Iptable rules, what seem to be the issue is the forward rules, when I removed it local guest was not able able to access emby However, I the the portforward rules are needed for external client to access emby server Any idea on how to rewrite the rules? Otherwise I will use emby blacklist rules iptables -I FORWARD -i br0 -o br1 -j ACCEPT iptables -I FORWARD -i br1 -o br0 -m state --state RELATED.ESTABLISED -j ACCEPT iptables -I FORWARD -i br1 -o br0 -j DROP ext_port=8096 int_port=8096 int_ip=192.168.1.104 iptables -t nat -I PREROUTING -p tcp -d $(nvram get oet1_ipaddr) --dport $ext_port -j DNAT --to $int_ip:$int_port iptables -I FORWARD -p tcp -d $int_ip --dport $int_port -j ACCEPT You may need to ask on the ddwrt forums - this is a networking/ddwrt issue rather than an Emby issue.
Happy2Play 9783 Posted March 6, 2023 Posted March 6, 2023 Doesn't Guest network Wireless Isolation accomplish this?
t123thomas 63 Posted March 6, 2023 Author Posted March 6, 2023 (edited) I have resolve the issue through emby blacklist I prefer this approach its easy to isolate specific IP or and subnet. The iptable works fine, the issue because is I opened internal and external port forward which allows guest into emby once I removed the port forward guest are completely isolated. Edited March 10, 2023 by t123thomas 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now