Hallo,
ich würde gerne unsere Website aus China ganz sperren.
Mails und ich selbst (wohne auch in China) sollen aber noch funktionieren (dh. meine IP von meinem Router) soll auf die Website dürfen genauso wie jeder andere Traffic (FTP, SMTP, ...)
Das wäre ja prinzipiell recht einfach:
https://www.countryipblocks.net/country_selection.php
Wie bekomme ich es hin, dass ganz China außer mir geblockt wird?
Soll mein PC (ubuntu) sich alle 5 min auf dem Server (debian) per SSH einloggen und die Adresse irgendwie in die .htaccess schreiben und apache reload machen?
Oder gibt es eine elegantere Möglichkeit?
Kann ich mich vom Server aus per dyndns auf 'allow' setzen?
Sollte evtl. noch erwähnen, dass meine IP alle 24h erneuert wird.
Danke schon mal
Bye, Transmitter
Land von Website ausschließen?
Re: Land von Website ausschließen?
Code: Alles auswählen
$ apt-cache search geoip
geoip-database-contrib - GeoLite binary database (downloader)
geoip-bin - IP lookup command line tools that use the GeoIP library
libgeoip-dev - Development files for the GeoIP library
libgeoip1 - non-DNS IP-to-country resolver library
geoip-database - IP lookup command line tools that use the GeoIP library (country database)
libapache2-mod-geoip - GeoIP support for apache2
libgeo-ip-perl - Perl interface to GeoIP library
nginx-extras - nginx web/proxy server (extended version)
nginx-full - nginx web/proxy server (standard version)
php5-geoip - GeoIP module for php5
proftpd-mod-geoip - ProFTPD mod_geoip
python-geoip - Python bindings for the GeoIP IP-to-country resolver library
python-torctl - Tor control library for Python
tclgeoip - Tcl extension implementing GeoIP lookup functions
tor-geoipdb - GeoIP database for Tor
xtables-addons-common - Extensions targets and matches for iptables [tools, libs]
xtables-addons-dkms - Extensions targets and matches for iptables
xtables-addons-source - Extensions targets and matches for iptables [modules sources]
Ungelöstt:
Problem mit Lighttpd und Geoip (Compile) (lighty 1.5)
http://www.howtoforge.de/howto/installa ... bian-etch/
analog
http://tutorials.ludwig.im/lighttpd-1.5-debian/
mfg rendegast
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")
-
- Beiträge: 262
- Registriert: 21.01.2005 15:17:06
Re: Land von Website ausschließen?
Daraus sehe ich aber noch nicht, wie ich mich NICHT aussperre ..?
Re: Land von Website ausschließen?
Die readme und manpages lesen.
google "geoip iptables" bringt dann sowas
http://www.atwillys.de/uncategorized/bl ... 012-04-14/:
Wenn Du obiges DROP auf http/ftp/mail beschränkst, hast Du noch 60.000 Ports,
um zBsp. über port-knocking Deine IP zu integrieren, oder per scp/ssh eintragen, oder ....
google "geoip iptables" bringt dann sowas
http://www.atwillys.de/uncategorized/bl ... 012-04-14/:
Wie Du da dann Deine wechselnde IP einbaust?Example
Block all incoming traffic not coming from Germany, France or Great Britain. To prevent trouble during the setup, accept incoming from class C networks. We insert these rules at position 1 and 2, so that ufw filters are processed later on.
iptables -I INPUT 1 -s 192.168.0.0/24 -j ACCEPT
iptables -I INPUT 2 -m state --state NEW -m geoip ! --source-country DE,GB,FR -j DROP
Wenn Du obiges DROP auf http/ftp/mail beschränkst, hast Du noch 60.000 Ports,
um zBsp. über port-knocking Deine IP zu integrieren, oder per scp/ssh eintragen, oder ....
mfg rendegast
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")