~ubuntu-branches/ubuntu/raring/hplip/raring

« back to all changes in this revision

Viewing changes to init-iptables-firewall

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-12-14 20:08:44 UTC
  • mfrom: (2.1.118 lucid)
  • Revision ID: james.westby@ubuntu.com-20091214200844-z8qhqwgppbu3t7ze
Tags: 3.9.10-4
KBSD patch from KiBi (Closes: #560796)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash
 
2
 
 
3
conffile="/etc/sysconfig/iptables"
 
4
 
 
5
iptables -L | egrep -q '427|svrloc'
 
6
if [ $? -ne 0 ]; then
 
7
    iptables -I INPUT 4 -p udp --sport 427 -j ACCEPT
 
8
    iptables-save >$conffile
 
9
fi
 
10
 
 
11
iptables -L | egrep -q '5353|mdns'
 
12
if [ $? -ne 0 ]; then
 
13
    iptables -I INPUT 4 -p udp --sport 5353 -j ACCEPT
 
14
    iptables-save >$conffile
 
15
fi
 
16
 
 
17
exit 0