Skip to contentSkip to conversation

Error responce when limiting access

DISCUSSION Mogens Valentin 3 participants 3 messages Jul 7, 2003 – Jul 8, 2003

lore
Share & tools
lore
#0 lore raw

Using iptables, I can of cause deny access to cirtain IP addresses or websites, however, I'd like to make sure clients do not just get a timeout, not found or something alike.
AFICS, it'll be difficult to set some errorresponce a browser can understand, allowing it to display a meaningful errorresponce.

Signature · 6 lines
Kind regards / venlig hilsen,
Mogens Valentin, Mr Dev

IT Networking, Security, Server Setup
www.danbbs.dk/~monz   [email protected]
Phone +45 32 525 878  Cell 51 227 668
#1 lore raw

Hi Mogens,

Quoted 5 lines

Using iptables, I can of cause deny access to cirtain IP addresses or websites, however, I'd like to make sure clients do not just get a timeout, not found or something alike.
AFICS, it'll be difficult to set some errorresponce a browser can understand, allowing it to display a meaningful errorresponce.

Use a DNAT rule to redirect them to a local web server, or a Squid proxy which is configured to deny all requests. Then you can configure these to serve up a suitable error page which you can design yourself.

Cheers, Chris.

Signature · 4 lines
   ___ __     _
 / __// / ,__(_)_  | Chris Wilson -- UNIX Firewall Lead Developer |
/ (_ / ,\/ _/ /_ \ | NetServers.co.uk http://www.netservers.co.uk |
\ _//_/_/_//_/___/ | 21 Signet Court, Cambridge, UK. 01223 576516 |
#2 lore raw
In reply to Mogens Valentin
Quoted 8 lines · Mogens Valentin

Using iptables, I can of cause deny access to cirtain IP addresses or websites, however, I'd like to make sure clients do not just get a timeout, not found or something alike.
AFICS, it'll be difficult to set some errorresponce a browser can understand, allowing it to display a meaningful errorresponce.

Use a tcp reset instead of just dropping the packet. Try -j REJECT.