How to Configure Your Firewall in Linux

Document ID:HO3562
 
  Properties  

Environment

Firewall, linux, configure

Solution

Overview

This article explains the firewall configuration steps in order to ensure the proper operation of Lexmark Printers on the various Linux Distributions.

Explanation

The Lexmark Printer drivers require a number of communication ports to be open to allow communication with the printer over Wireless, Wired, or even over USB connections.


Solution

Command line for IPTABLES
  1. Open a terminal

  2. Type 'su' (without quotes), and press Enter. NOTE: You will have to enter the root password.

  3. The following two command lines will open the port 5353 for incoming and outgoing connections:

  • iptables -I INPUT -p udp -m udp --sport 5353 -j ACCEPT

  • iptables -I OUTPUT -p udp -m udp --dport 5353 -j ACCEPT

NOTE: These steps will work on most distributions configured with IPTABLES. There is no common command to make these rules persistent.

For more help on IPTABLES, please visit the webpage: http://www.netfilter.org/.


Command line for Uncomplicated Firewall (ufw)

Simply open the console and enter the following:

  • ufw allow 5353

Command line for Red Hat Fedora

Open the console and enter the following to save the IPTABLES configuration permanently:

  • service iptables save

Firestarter
  • Manually edit /etc/firestarter/inbound/allow-service and /etc/firestarter/outbound/allow-service configuration files with a text editor.

The Configuration file "allow-service" should contain the following line:

Mdns, 5353, everyone

Explanation:

  • Service name : mdns

  • Port : single or range of ports (For Lexmark Printers: 5353)

  • Source: can either be

    • * everyone (For Lexmark Printers)
    • * network/netmask (e.g. 192.168.0.1/255.255.255.0)
    • * CIDR notation (e.g. 192.168.0.1/24)
  • Use the Graphical User Interface (GUI).
Step Action Image
1 Go to System > Administration menu and launch Firestarter.  
2 Click Policy tab and select "Inbound traffic policy".  
3 Right-hand click on the "Allow service" area, and click on "Add rule".  
4 In the rule window, type 5353 in "Port", select source as "Anyone", then click "Add".  
5 Select "Outbound traffic policy", if "Restrictive by default", then right click on the "Allow service" area, and click "Add rule".  
6 In the rule window, do the same as Step 4.  
7 Click "Apply policy" for the changes to take effect.  

 

For more help on Firestarter, please visit the webpage: http://www.fs-security.com/.


Applies to:
  • OpenSUSE 11.0
  • OpenSUSE 11.1
  • Ubuntu 8.04 LTS
  • Ubuntu 8.10
  • Fedora 10

All products with Linux support based on the Linux Compatibility Page.

 

Still Need Help?
If you require additional assistance, please contact Lexmark Technical Support. NOTE: When calling for support, you will need your printer/model type and serial number (SN).
Please call from near the computer and printer in case the technician on the phone asks you to perform a task on this device.

 



Link:
Please enter the email address you would like to send a copy of this page to.