Re: is this a secure iptables?



elh.maayan@xxxxxxxxx writes:

On Feb 20, 7:14 pm, goarilla <"kevin DOT paulus AT skynet DOT be">
wrote:
correction: if you enable NBT over tcp/ip you can close down
port 445 as well ...

thanks, other then that, it looks ok?

I did not really look at your rules. But if you use connection tracking
you might wish to drop invalid packets first (see man
iptables). Additionally if you don't use ipv6, disable it. If you use it
or don't want to disable it you might wish to to use ip6tables.

The safest bet is to have only processes listening you really need
(maybe bind to specific address/localhost - check with netstat and also
use the access restrictions provided by those processes).
Read some more documentation (especially about connection tracking) and
maybe take a look at what the others do, f.e. there are some helpers out
there to create your rules. (maybe shorewall)
Last but not least you can use tools like nmap to test your rules.

After a quick look at your rules:
- I don't really understand whats the intent of your "okay" chain.
- to detect problems it is often useful to log the packets you drop
(maybe rate limited)
- don't accept packets with local addresses from external interfaces
(or generally don't accept packets with source addresses you don't
expect on that interface)

Hope that helps

PS: don't overestimate the effect of firewall rules for overall security
.



Relevant Pages

  • comparision of firewalling on Linux and FreeBSD
    ... I am especially interested in learning about ease of connection tracking ... and of getting packets into user space for analysis via scripts. ...
    (freebsd-net)
  • Re: iptables dropping legitimate packets?
    ... >> about the dropped packets. ... > The packets are not being dropped because they have a destination addresses of ... the following web site will tell you all you didn't want to ... know about connection tracking. ...
    (Fedora)
  • Re: Load balancing with multiple ADSL connections?
    ... You need to patch the kernel or there is problems with ... > packets coming out of the wrong interface when you are doing nat with ... > several different external interfaces. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: Please enable firewalls by default on Linux distributions
    ... >> packets that don't contain the IP address of the machine you are on. ... No reason to filter them. ... > have privileges to reconfigure the firewall. ... listen on ports on external interfaces. ...
    (comp.os.linux.security)
  • Re: Re: Loading balancing with more than one ISP.
    ... When you tcpdump both external interfaces, do the packets on ... the interface that the 1921.68.0.0/24 network is supposed to use look ...
    (freebsd-questions)