Networking Forums

Networking Forums > Computer Networking > Linux Networking > Help about iptables and ICMP type 3

Reply
Thread Tools Display Modes

Help about iptables and ICMP type 3

 
 
Odin_Eidolon
Guest
Posts: n/a

 
      03-02-2005, 01:18 PM
Hello there,
I have set a DNAT rule in my server's iptables for port 80 that forwards
all the incoming connections to the port 80 of another client on my LAN
with Apache web server ran.
When Apache is up, that's all right... but when I shutdown Apache,
external clients that try connecting to the port 80, immediately
receives the message "connection refused".

So, in order to avoid this answer, I've tried to correctly set an
iptables rule on my server:

# iptables -t nat -I PREROUTING -p icmp --icmp-type 3 -j DROP

but nothing changes.

So, I've tried:

# iptables -I OUTPUT -p icmp --icmp-type 3 -j DROP

and:

# iptables -I FORWARD -p icmp --icmp-type 3 -j DROP

and the same three rules above with --icmp-type "any"...
....but nothing changes.

The main idea is this:

Before:
client --icmp3--> server --icmp3--> external_client

After:
client --icmp3--> server|DROP| external_client

How can I do?

Thanks in advance,
Odin_Eidolon
 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      03-02-2005, 05:50 PM
Odin_Eidolon wrote:
> Hello there,
> I have set a DNAT rule in my server's iptables for port 80 that forwards
> all the incoming connections to the port 80 of another client on my LAN
> with Apache web server ran.
> When Apache is up, that's all right... but when I shutdown Apache,
> external clients that try connecting to the port 80, immediately
> receives the message "connection refused".
>
> So, in order to avoid this answer, I've tried to correctly set an
> iptables rule on my server:
>
> # iptables -t nat -I PREROUTING -p icmp --icmp-type 3 -j DROP
>
> but nothing changes.
>
> So, I've tried:
>
> # iptables -I OUTPUT -p icmp --icmp-type 3 -j DROP
>
> and:
>
> # iptables -I FORWARD -p icmp --icmp-type 3 -j DROP
>
> and the same three rules above with --icmp-type "any"...
> ...but nothing changes.
>
> The main idea is this:
>
> Before:
> client --icmp3--> server --icmp3--> external_client
>
> After:
> client --icmp3--> server|DROP| external_client
>
> How can I do?
>


What do you think to gain in not telling that the HTTP
server is not available? The host trying to connect
will continue to sens SYNs at timeout intervals instead
of going away with the refusal.

--

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
Odin_Eidolon
Guest
Posts: n/a

 
      03-02-2005, 06:40 PM
Tauno Voipio ha scritto:
> Odin_Eidolon wrote:

[cut]
> What do you think to gain in not telling that the HTTP
> server is not available? The host trying to connect
> will continue to sens SYNs at timeout intervals instead
> of going away with the refusal.


Mine was only an example. I've got an experimental server and I want
that all the ports appeares in stealth mode. In order to do this, I have
to lock icmp3 packets that go from a client of my LAN (through the
server) to the internet.
I'm doing this only for gain a better knowledge of network routing and
firewalling.


Waiting for a solution,
Odin_Eidolon
 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      03-03-2005, 10:18 AM
Odin_Eidolon wrote:
> Tauno Voipio ha scritto:
>
>> Odin_Eidolon wrote:

>
> [cut]
>
>> What do you think to gain in not telling that the HTTP
>> server is not available? The host trying to connect
>> will continue to sens SYNs at timeout intervals instead
>> of going away with the refusal.

>
>
> Mine was only an example. I've got an experimental server and I want
> that all the ports appeares in stealth mode. In order to do this, I have
> to lock icmp3 packets that go from a client of my LAN (through the
> server) to the internet.
> I'm doing this only for gain a better knowledge of network routing and
> firewalling.


OK.

Get a book on TCP/IP protocols before continuing, so
you understand the consequences of disabling arbitrary
packets.

My favourite is

W. Richard Stevens, TCP/IP Illustrated

It will explain why fiddling with ICMP has to be made
like porcupine love - very carefully.

--

Tauno Voipio
tauno voipio (at) iki fi


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables: state RELATED and ICMP jqpx37 Linux Networking 3 08-30-2006 10:10 PM
icmp type 3 fragmentation needed: size of tcp header included serbant@gmail.com Linux Networking 0 06-08-2006 09:12 PM
icmp type 11 not go via nat POSTROUTING table bykov.victor@gmail.com Linux Networking 3 02-02-2006 11:48 PM
rfc 2923, suggestion "How to fix" to problem of section 2.1 (ICMP Type 3, Code 4) Ariel Burbaickij Linux Networking 2 03-17-2005 08:50 PM
invalid ICMP type 11 error when Samba is running Some Guy Linux Networking 0 02-23-2004 05:36 AM



1 2 3 4 5 6 7 8 9 10 11