Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been working with a Centos server for a while now. I have set 3 subnetworks in my LAN through alias networks (etho:o, eth0:1, etc). I have a sharer printer in one of those networks, and I would like all the other networks to be able to print to that printer, but appart from that those subnets should be completely isolated among them. I use shorewall as the firewall manager, but I cant seem to manage the rule that will allow me to do that. I have read tons of materials on shorewall and iptables, but I cant manage to get this working. Would anyone help me on this?

share|improve this question
I have managed to do this, but by addking an iptables rule: /sbin/iptables -t nat -A POSTROUTING -s -d -j MASQUERADE, but it isnt coming from shorewall. – rodrigocaicedo Apr 8 '13 at 4:12
Must clarify that my eth0 is lan, and if I add the -o eth0 parameter to the rule above, it wont work – rodrigocaicedo Apr 8 '13 at 4:14 has some good info about the scenario you're facing, so definitely have a read of that.

I can't see why you'd want to use masquerade for something simple like getting your networks to to each other for printing purposes. If you post your dump somewhere visible (preferably immediately after you've restarted shorewall and then attempted a print job) we might be able to understand your issue better.

share|improve this answer

Your Answer


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.