Community discussions

MikroTik App
 
waitek
just joined
Topic Author
Posts: 3
Joined: Thu May 01, 2014 11:06 pm

Share printer with two networks

Thu May 01, 2014 11:12 pm

We have two networks running from an RB1100AH router:
1. 192.168.1.0/24 (interface ether2)
2. 192.168.0.0/24 (interface ether10)

I’d like to print to an HP P2055dn printer at 192.168.1.100 (static IP) from the second network on ether10.
Here’s what I’ve done with the firewall:
add chain=forward comment="hp printer access" dst-address=192.168.1.100 in-interface=ether10 \ 
out-interface=ether2 src-address=192.168.0.0/24

add chain=forward comment="hp printer access" connection-state=established dst-address=\
192.168.0.0/24 in-interface=ether2 out-interface=ether10 src-address=192.168.1.100
From the second network (192.168.0.0/24), I’m able to ping the printer but not print to it. What am I missing?

Thank you.
 
User avatar
Egate
Long time Member
Long time Member
Posts: 555
Joined: Thu May 15, 2008 10:43 am
Location: South Africa

Re: Share printer with two networks

Sun May 04, 2014 12:14 am

Sounds like routing problem. Don't need rules to accomplish this, maybe masquerade rule with ether 2 as out interface, because most printers can only set gateway. Create route in pc using 192.168.0.0/24 (actual ip of router) as gateway for destination ip 192.168.1.0/24.
 
waitek
just joined
Topic Author
Posts: 3
Joined: Thu May 01, 2014 11:06 pm

Re: Share printer with two networks

Mon May 05, 2014 4:59 pm

Ah, the solution was easy enough once I re-checked my firewall rules. I had a rule above the ones I was adding that dropped everything that wasn't from a specific MAC address.

So for anyone trying to share a printer across two networks running under a single Mikrotik, you can simply use firewall rules, substituting your network information:

chain=forward action=accept connection-state=new
src-address=192.168.0.0/24 dst-address=192.168.1.100
in-interface=ether10 out-interface=ether2

chain=forward action=accept connection-state=established
src-address=192.168.0.0/24 dst-address=192.168.1.100
in-interface=ether10 out-interface=ether2

chain=forward action=accept connection-state=established
src-address=192.168.1.100 dst-address=192.168.0.0/24 in-interface=ether2
out-interface=ether10