Koozali.org: home of the SME Server

Deny source

ElFroggio

Deny source
« on: March 16, 2005, 08:28:04 PM »
How can I deny access to my website to a specific computer name:

ABC.XYZ.COM

They come everyday and do a full download of the site.

I thought of using HOSTS.DENY, but it has already ALL:ALL, so I don't understand how can everybody access the site?

Which config file should I use or should I deal with IPTABLES directly?

Thanks

Offline Curly

  • ****
  • 114
  • +0/-0
Deny source
« Reply #1 on: March 16, 2005, 09:31:15 PM »
If you should type something into IPTABLES, than you could deny all trafic from that machine:

/sbin/iptables -I INPUT -s <ip-address> -j DROP

but if this person really wants your files, he will just use a proxy-server.

I'm sure this will be gone after a reboot, so to make this change permanent you will need this command somewhere in the sme-server configuration.
.......................................

ElFroggio

Deny source
« Reply #2 on: March 16, 2005, 11:37:43 PM »
Quote
so to make this change permanent you will need this command somewhere in the sme-server configuration.


Do you know not where? That's what I'd like to know.

Offline raem

  • *
  • 3,972
  • +4/-0
Deny source
« Reply #3 on: March 17, 2005, 01:06:08 AM »
ElFroggio

> Do you know not where?

See this thread for some clues
You will have to work out which fragment to add that to.
Copy existing fragment(s) from
/etc/e-smith/templates-custom/etc/rc.d/init.d/masq/
to
/etc/e-smith/templates-custom/etc/rc.d/init.d/masq/

and modify it as required
...

Offline raem

  • *
  • 3,972
  • +4/-0
Deny source
« Reply #4 on: March 17, 2005, 01:24:48 AM »
ElFroggio

Sorry try again, I left out the thread link & corrected the templates location.

> Do you know not where?

See this thread for some clues

http://forums.contribs.org/index.php?topic=26445.0

You will have to work out which fragment to add that to.
Copy existing fragment(s) from
/etc/e-smith/templates/etc/rc.d/init.d/masq/
to
/etc/e-smith/templates-custom/etc/rc.d/init.d/masq/

create the folder first if required eg

mkdir -p /etc/e-smith/templates-custom/etc/rc.d/init.d/masq/

and modify the fragment as required

expand template and restart masq
...