Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

So there is a network: 192.168.1.0/24. Router is an OpenWrt 12.04 on a WRT160NL.

We got a new network printer. But it's www server is reachable to everyone in the network (and thus everyone can print with it..).

Q: How can I disable the network access for all the machines in 192.168.1.0/24 - and only let 2 IP's ex.: 192.168.1.10 and .20 to access the printer? - there isn't ANY access control on the network printer...

share|improve this question
    
Do you have a firewall? –  Joseph R. Oct 4 '13 at 19:48
    
the router connects to the ISP, and the clients connect to the router. iptables is on openwrt. –  gasko peter Oct 4 '13 at 19:49
    
I haven't tried this before, but I think what you want should be possible if you connect the printer to your router instead of a switch (so that it's only accessible through the router's firewall) and configure iptables to drop any traffic whose destination is the printer's IP and whose source isn't one of the two allowed IPs. –  Joseph R. Oct 4 '13 at 19:52
add comment

1 Answer 1

up vote 0 down vote accepted

Sorry, you would probably need additional hardware for that.

You need to put the network printer in an independent subnet, connected through a firewall. If you had VLAN support on the internal switch, you could put the network printer's port on a separate VLAN. OpenWrt supports VLANs in general, but unfortunately your hardware isn't working correctly at the moment.

http://wiki.openwrt.org/toh/linksys/wrt160nl#switch.ports.for.vlans

But if your printer also supports USB, you might use that with the routers USB port. The recommended solution is p910nd. Then you could control access using firewall rules.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.