Linux Netfilter discussions
 help / color / mirror / Atom feed
* security question
@ 2004-06-02 12:58 Andreas Westendörpf
  2004-07-29 12:14 ` Blocking IP david
  0 siblings, 1 reply; 15+ messages in thread
From: Andreas Westendörpf @ 2004-06-02 12:58 UTC (permalink / raw)
  To: netfilter

Hi *!

I have the following setup. Please tell me if I have some security
issues here.

A linux box with two ethernet interfaces to work as a masquerading
router. One of them (eth0) is connected to a dsl-modem, the other is a
wlan card (eth1). All client systems get this box a default gateway
via dhcp.

My goal is to drop everything coming from the wlan by default. I do
this with:

# iptables -t nat -P PREROUTING  DROP

I want the all www-requests of the client systems to be redirected to
the local Apache on the box. I do this with:

# iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth1 - REDIRECT

As I need DNS for these www-requests I have to let DNS be accepted:

# iptables -t nat -A PREROUTING -p udp --dport 53 -i eth1 -j ACCEPT

Then, in the POSTROUTING chain I need all the packets that made it
here to be masqueraded:

# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

If I want to allow a specific wlan client to get outside connections I
use:

# iptables -t nat -I PREROUTING -m mac --mac-source XX:XX:XX:XX:XX:XX
-i the1 -j ACCEPT

to let him through.

Beside of MAC-spoofing, is this setup safe? Can someone get though the
PREROUTING chain, without being "MAC-inserted".

What can I do to block incoming connection attempts? I only want to
allow ssh from outside (internet) to the box.

Any help would be appreciated!

THX,
Andreas Westendörpf




^ permalink raw reply	[flat|nested] 15+ messages in thread
* Blocking ip
@ 2003-12-25 13:13 -
  0 siblings, 0 replies; 15+ messages in thread
From: - @ 2003-12-25 13:13 UTC (permalink / raw)
  To: netfilter

I would like to block a specific IP adress from the internet using an 
iptables rule (for all ports) - How does it looks like ? (iptables v 1.2.6)



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-07-29 16:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-02 12:58 security question Andreas Westendörpf
2004-07-29 12:14 ` Blocking IP david
2004-07-29 12:10   ` Victor Julien
2004-07-29 12:40     ` david
2004-07-29 13:29       ` Victor Julien
2004-07-29 13:42       ` Les Mikesell
2004-07-29 12:18   ` Alejandro Flores
2004-07-29 14:15     ` Aleksandar Milivojevic
2004-07-29 16:57       ` Alejandro Flores
2004-07-29 12:25   ` Dhananjoy Chowdhury
2004-07-29 12:28   ` Les Mikesell
2004-07-29 12:48     ` david
2004-07-29 12:31   ` David Cannings
2004-07-29 14:04   ` Aleksandar Milivojevic
  -- strict thread matches above, loose matches on Subject: below --
2003-12-25 13:13 Blocking ip -

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox