0

I didn't find a way but it can't be so hard : How make Apache2 Listen a port but not responding.

My VH:

<VirtualHost *:80>
    ServerName catchall
</VirtualHost>

I don't want to respond 403 or another status... I want the connexion failed.

Why ? Just because I have an other VH on the same port but wich is responding for a domain and I can't have this IP connection.

Thank you.

Robin
  • 1

1 Answers1

0

I believe you should just be able to block the outgoing port through iptables with something along the lines of:

iptables -A OUTPUT -p tcp --dport 403 -j DROP

Just configure it to listen, and then on response its outgoing packet should be dropped silently. This rule would have to be before any outgoing rule that might apply that might include the

"--state ESTABLISHED -j ACCEPT" 

Line.

More information can be found here: http://linuxconfig.org/collection-of-basic-linux-firewall-iptables-rules"

Gravy
  • 770
  • 1
  • 5
  • 17