[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables



Jiann-Ming Su wrote:
On 11/5/05, Roy <pict001a@yahoo.co.uk> wrote:

I've been using Debian since the arrival of Sarge and found it excellent,
compared to Mandrake.  On Mandrake I was able to configure iptables, as the
file was located in etc/iptables, unfortunately being new to Debian i'm
unable to find the location of iptable.



Put your iptables rules in a file somewhere convenient, i.e.
/etc/iptables.up.rules:

  *filter
  :INPUT DROP [0:0]
  :FORWARD DROP [0:0]
  :OUTPUT ACCEPT [0:0]
  :IN_TCP - [0:0]
  -A INPUT -i lo -j ACCEPT
  -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
  -A INPUT -p tcp -m state --state NEW -j IN_TCP
  -A IN_TCP -p tcp -m tcp --dport 22 -j ACCEPT
  -A IN_TCP -j ULOG --ulog-prefix "IN_TCP cleanup: "
  -A IN_TCP -j DROP
  COMMIT

Then update /etc/network/interfaces:

  #iface eth0 inet dhcp
  iface eth0 inet static
    pre-up iptables-restore < /etc/iptables.up.rules
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1


--
Jiann-Ming Su

A little late with the post but thanks for the suggestion!
I was looking for a way to start Firehol other than manually all the time.

H










Reply to: