 | |  |
Verfasst am: 21.07.2007 13:34 |
|
|
duddits |
|
 |
 |
Anmeldedatum: 03.01.2006 |
Beitrge: 569 |
Wohnort: /proc |
|
|
 |
 |
 |
|
und was ist daran so schlimm, das man alle Pakete die zu einer Verbindung gehren erlaubt?
Damit ist es halt mglich die Antwortpakete sowie Pakete mit Fehlermeldungen zu erlauben, die zuvor mit NEW erlaubt wurden.
Ich muss gestehen das ich das Problem daran nicht erkennen kann.
Wenn du nur fr FTP den Zugang erlaubt hast wirst du natrlich auch nur Pakete die zum FTP-Verkehr gehren, erhalten.
Wenn du z.b. eine HTTP-Verbindung aufbaust wirst du doch auch Antwortpakte erlauben mssen, da es ja eine TCP-Verbindung ist und du eine 3-Way.Handshake durchfhrst.
Wenn du einen FTP-Server auf dem selben Rechner wie dem Paketfilter laufen hast, kannst du diesen wie oben bereits gezeigt mit
Code: |
IPT=/sbin/iptables
MODPROBE=/sbin/modprobe
$MODPROBE ip_conntrack_ftp
$IPT -A INPUT -p tcp --dport 21 -m state --state NEW -j ACCEPT
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT |
schtzen, ohne untiger weise Ports zu ffenen, die auch dann offen sein werden, wenn keine FTP-Verbindung besteht.
Vll. sollte ich das ganze ein wenig genauer erlutern:
Also mit $MODPROBE ip_conntrack_ftp wird das Staeful Inspection fr das FTP-Protokoll aktivert, diese funktioniert so:
(Sofern das entsprechende Modul geladen wurde) Sobald der Linux-Kernel erkennt, dass eine FTP-Steuerungsverbindung durch die Firewall erlaubt wurde ($IPT -A INPUT -p tcp --dport 21 -m state --state NEW -j ACCEPT), betrachtet der Kernel jedes Paket, welches zu dieser Verbindung gehrt.
Dabei achtet er speziell auf das PORT- und PASV-Kommando. Sobald nun einer dieser Kommandos erkannt werden, wird die resultierende Verbindung (die man ja als Ersteller des Firewall-Skriptes nicht voraussehen kann) selbstndig und automatisch in der Zustandstabelle (Connection Tracking Table, kann man unter /proc/net/ip_conntrack oder mit dem Befehl iptstate betrachten). Daher ist natrlich auch der Einsatz der Connection Tracking unbedingt erforderlich. Diese Verbindung und alle ihr zugehrigen Pakete erhalten nun den Zustand RELATED, da sie mit einer anderen Verbindung (der Steuerungsverbindung) verwandt sind, auch bekannt als Expectations.
Die Erkennung erfolgt standardmig ber den Port 21.
Wie gesagt, da man ja bei TCP eingehende und ausgehende Pakete hat, muss man halt die zugehrigen Pakte die zu dieser Verbindung gehren erlauben.
Siehe hierzu auch folgende beiden Seiten die evtl. noch ein wenig mehr Licht ins dunkel bringen:
http://www.kalamazoolinux.org/presentations/20010417/conntrack.html
http://www.sns.ias.edu/~jns/wp/2006/01/24/iptables-how-does-it-work/
Die Lsung die ich hier vorgeschlagen ist unabhngig ob nun aktives oder passives FTP verwende. Wenn man allerdings wei womit man es hier zu tun, so sollte man machen wie im zweiten Link gezeigt.
Natrlich knnen im LAN Features wie Connection Tracking mit TCP/IP-Session-Hijacking ausgehebelt werden:
*links zensiert*
Gru
Daniel |
|
|
|
|
 | |  |
Verfasst am: 21.07.2007 14:02 |
|
|
Cerox |
|
 |
 |
Anmeldedatum: 31.12.2005 |
Beitrge: 782 |
Wohnort: Engelskirchen |
|
|
 |
 |
 |
|
Ok, ich werde mir das nochmal anschauen, ob ich wirklich die passiven Ports separat freigeben muss.
Bitte keine Links zu "Hacking-Software" oder Anleitungen zur Kompromittierung von Netzen posten. |
|
|
|
|
 | |  |
Verfasst am: 22.07.2007 20:57 |
|
|
Cerox |
|
 |
 |
Anmeldedatum: 31.12.2005 |
Beitrge: 782 |
Wohnort: Engelskirchen |
|
|
 |
 |
 |
|
So, hab mir mal nen Skript fr ne normale Workstation im LAN geschrieben:
Code: | #!/bin/bash
#iptables-Script; letzte Aenderung: 22.07.07
#Einsatz: Auf einer Workstation; nicht fuer Server ausgelegt
IPT=$(which iptables)
MODPROBE=$(which modprobe)
#Module laden
$MODPROBE ip_tables
$MODPROBE ip_conntrack
$MODPROBE ip_conntrack_ftp
#Alle Regeln loeschen
$IPT -F INPUT
$IPT -F OUTPUT
$IPT -F FORWARD
$IPT -F DROPKETTE
$IPT -X DROPKETTE
#Policies setzen
$IPT -P INPUT DROP
$IPT -P OUTPUT DROP
$IPT -P FORWARD DROP
#Logging-Kette; Pakete loggen und verwerfen
$IPT -N DROPKETTE
$IPT -A DROPKETTE -j LOG -m limit --limit 5/s --log-prefix "Blockiert:"
$IPT -A DROPKETTE -j DROP
#Loopback-Kommunikation immer erlauben
$IPT -A INPUT -i lo -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
$IPT -A OUTPUT -o lo -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
#SYN-Flooding Schutz
$IPT -A INPUT -p tcp --syn -m limit --limit 5/s -j ACCEPT
#----------------------------------------------------------------------------------------------------#
#Kommunikation im lokalen Netzwerk (192.168.5.0/24)
#SMB im lokalen Netzwerk erlauben
$IPT -A OUTPUT -d 192.168.5.0/24 -p tcp -m multiport --dport 137,139,445 -j ACCEPT
#Zum Server SSH, Teamspeak Webinterface erlauben
$IPT -A OUTPUT -s 192.168.5.3 -d 192.168.5.2 -p tcp -m multiport --dport 1899,14534 -j ACCEPT
#----------------------------------------------------------------------------------------------------#
#Kommunikation allgemein
#Ausgehende Services zulassen
$IPT -A OUTPUT -p tcp -m multiport --dport 20,21,22,25,80,110,443,1863,5190,5223 -j ACCEPT
#1863 -> MSN, 5190 -> ICQ, 5223 -> Jabber
#DNS-Abfragen erlauben
$IPT -A OUTPUT -p udp --dport 53 -j ACCEPT
#----------------------------------------------------------------------------------------------------#
#ICMP
#ICMP eingehend
$IPT -A INPUT -p icmp --icmp-type fragmentation-needed -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type parameter-problem -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type timestamp-reply -j ACCEPT
$IPT -A INPUT -p icmp --icmp-type timestamp-request -j ACCEPT
#ICMP ausgehend
$IPT -A OUTPUT -p icmp -j ACCEPT
#----------------------------------------------------------------------------------------------------#
#Rueckantworten hergestellter oder verwandter Verbindungen
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#Verworfene Pakete loggen
$IPT -A INPUT -j DROPKETTE
$IPT -A FORWARD -j DROPKETTE
$IPT -A OUTPUT -j DROPKETTE |
Man kann das beim ICMP-Teil vermutlich hnlich wie mit der "multiport"-Option abkrzen; das Abkrzen hat aber auch Nachteile. Wenn man sich mal die Tabellen mit "iptables -L" anschaut, ist das ganze meiner Meinung nach unbersichtlicher.
Wenn man eh nur mit dem Skript arbeitet und nicht oft in die Tabellen schaut, kann man das allerdings verkraften. Fr das Arbeiten im Skript ist diese Krzung schon ganz vorteilhaft.
Die Netzwerkeinstellungen/Kernelparameter habe ich wie schon beschrieben in der sysctl.conf definiert.
Passives FTP habe ich noch nicht getestet; muss die ich Tage mal auf dem Server machen. Ausgehend kann ich mit diesem Skript passive FTP-Sessions aufbauen. |
|
|
|
|
 | |  |
Verfasst am: 19.03.2021 08:10 |
|
|
warganic |
|
|
 |
Anmeldedatum: 26.02.2021 |
Beitrge: 247408 |
|
|
|
 |
 |
 |
|
|
|
|
|
 | |  |
Verfasst am: 03.06.2021 08:31 |
|
|
warganic |
|
|
 |
Anmeldedatum: 26.02.2021 |
Beitrge: 247408 |
|
|
|
 |
 |
 |
|
|
|
|
|
 | |  |
Verfasst am: 03.10.2021 21:06 |
|
|
warganic |
|
|
 |
Anmeldedatum: 26.02.2021 |
Beitrge: 247408 |
|
|
|
 |
 |
 |
|
|
|
|
|
 | |  |
Verfasst am: 26.11.2021 02:20 |
|
|
warganic |
|
|
 |
Anmeldedatum: 26.02.2021 |
Beitrge: 247408 |
|
|
|
 |
 |
 |
|
|
|
|
|
 | |  |
Verfasst am: 19.01.2022 03:45 |
|
|
warganic |
|
|
 |
Anmeldedatum: 26.02.2021 |
Beitrge: 247408 |
|
|
|
 |
 |
 |
|
|
|
|
|
 |  | Peringkat Teratas Agen Slot Link |
|  |
Verfasst am: 21.02.2022 23:55 |
|
|
FrankJScott |
|
|
 |
Anmeldedatum: 04.08.2021 |
Beitrge: 4235 |
Wohnort: Time Travel |
|
|
 |
 |
 |
|
Untuk wanita bertanya tentang judi slot online terbaik 2020, slot gacor hari ini 2021, deposit pulsa tanpa potongan 10rb, Saya sangat menyarankan ini berguna situs judi toko or slot online deposit pulsa 5000, agen slot deposit minimal 10rb, slot pakai pulsa xl, situs judi online24jam deposit pulsa, slot deposit bonus 100, game slot deposit 5rb, situs judi bola resmi dunia, di atas ini keren slot bonus domain di atas ini situs slot pulsa telkomsel tanpa potongan, agen slot pulsa indosat, slot gacor 888, deposit via pulsa indosat tanpa potongan, situs judi togel, presidenslot situs taruhan slot online terbaik di indonesia, slot gacor terpercaya, dan juga ini lihat slot gacor link which is also great. Also have a look at this lihat agen judi toko bersama semua ini slot deposit bonus 100, slot online pragmatic play indonesia, situs slot gacor tanpa potongan pulsa, agen judi slot deposit pulsa tanpa potongan, situs judi slot online gampang menang bonus new member 100, agen judi gacor, slot deposit pulsa xl terbaru, belum lagi ini luar biasa situs judi halaman belum lagi ini situs judi slot online deposit via pulsa xl, agen slot 168, slot pulsa, slot terbaik dan terpercaya 2021, slot deposit dana 10000, slot deposit 20 bonus 30 ribu, situs slot pulsa tanpa potongan 2021, di atas ini lihat slot terbaik forum yang juga layak untuk dilihat. Saya juga merekomendasikan ini luar biasa slot gacor situs dan juga ini slot phones and prices 2020, judo sloth gaming discord, no deposit limit slots, situs slot gacor 2021, agen slot terpercaya via pulsa, online slot games no deposit, slot bonus, di atas ini lihat slot pulsa halaman belum lagi ini slot deposit pulsa xl tanpa potongan, agen judi slot online terpercaya 2021, agen slot gacor 2022, situs slot gacor pg soft, situs judi slot online deposit via linkaja, situs judi slot 4d, slot gacor pragmatic, di atas ini luar biasa slot gacor toko yang juga hebat. Akhirnya, lihat ini luar biasa slot terpercaya halaman and slot online terpercaya 2021, agen slot deposit 10 ribu, slot terbaru terpercaya 2021, untuk memastikan ekstra. Lihat lainnya Baru Agen Judi Toko dbc6edf |
|
|
|
|
 | |  |
Verfasst am: 26.02.2022 12:14 |
|
|
warganic |
|
|
 |
Anmeldedatum: 26.02.2021 |
Beitrge: 247408 |
|
|
|
 |
 |
 |
|
|
|
|
|
Verfasst am: 11.03.2022 23:51 |
|
|
FrankJScott |
|
|
 |
Anmeldedatum: 04.08.2021 |
Beitrge: 4235 |
Wohnort: Time Travel |
|
|
 |
 |
 |
|
In response to the person asking about fivem cars discord, fivem server pack download, fivem cars list, fivem discord vehicle whitelist, fivem vehicle shop catalog, fivem server status discord bot github, fivem keymaster, fivem drift map pack, I highly recommend this useful fivem server blog or fivem server status, fivem discord leaks, how to add custom cars to fivem server, fivem freeze script, how to make fivem scripts, fivem mlo leaks discord, best fivem rp servers for beginners, fivem server pack download, as well as this awesome fivem server details not to mention fivem server romania roleplay, fivem server list romania, fivem vehicle mods not working, fivem server like gta online, fivem status bot github, fivem freecam script, fivem server mod packs, fivem server list empty, alongside all this useful fivem server details which is also great. Also have a look at this awesome fivem server info not to mention fivem status bar, fivem servers, best fivem car mods, fivem scripts, esx scripts fivem free, fivem vehicles with templates, fivem server discord template, fivem servers gta, alongside all this excellent fivem server details and don't forget fivem vehicle spawn codes, fivem server discord bot, fivem vehicle handling meta, fivem dlc cars pack, fivem leaks websites, fivem vehicle shop, fivem addon cars spawn code, fivem nopixel scripts free, and don't forget best fivem server tips which is also worth a look. I also recommend this awesome fivem server info as well as fivem server packet loss, fivem cars spawn codes, fivem server, fivem vehicle shop ui, fivem keys cheap, custom fivem cars for sale, fivem server discord bot, fivem vehicle shop esx, not to mention this excellent fivem server advice not to mention fivem blips builder, how to make fivem scripts, fivem vehicle shop, mlo fivem meaning, how to get a fivem server, fivem drift map pack, esx scripts fivem free, fivem gta server hosting, and don't forget new fivem server forum which is also great. Finally, have a look at this awesome fivem server site for good measure. Check more Excellent Fivem Servers Url 85a23be |
|
|
|
|
 |  | Cool Thai Ufabet222 Casino Info |
|  |
Verfasst am: 20.03.2022 16:12 |
|
|
FrankJScott |
|
|
 |
Anmeldedatum: 04.08.2021 |
Beitrge: 4235 |
Wohnort: Time Travel |
|
|
 |
 |
 |
|
Untuk pria bertanya tentang best strategy to win in baccarat, thai baccarat strategy, is there a strategy to baccarat, Saya sangat menyarankan ini luar biasa agen slot deposit pulsa toko or cara menang main baccarat online, thai sports betting, is baccarat a good brand reddit, how to baccarat strategy, tips baccarat online, can you win money playing baccarat, odds of banker winning in baccarat, dan jangan lupa ini luar biasa slot deposit bni situs dan juga ini ez baccarat vs mini baccarat, is video baccarat rigged, can you really win at baccarat, how do you win consistently in baccarat, thai sports betting, is there casino in thailand, is evolution gaming baccarat rigged, di atas ini hebat agen situs slot url. Also have a look at this peringkat teratas situs slot gacor domain belum lagi ini best strategy playing baccarat, can you bet online in thailand, can you win long term baccarat, can you win in baccarat, is evolution gaming baccarat rigged, cara menang main baccarat online, is baccarat beatable, dan jangan lupa ini luar biasa slot pasti menang situs belum lagi ini how to play real money baccarat online, how does baccarat work, what is the minimum bet in baccarat, can we win in baccarat, how to win baccarat strategy, webboard thai baccarat, is there gambling in thailand, bersama semua ini lihat slot deposit pulsa domain yang juga layak untuk dilihat. Saya juga menyarankan ini terbaik slot deposit pulsa tanpa potongan blog dan jangan lupa ini how to win at mini baccarat, is bet365 legal in thailand, thai paradise free slot games, is baccarat a good brand, how do i consistently win at baccarat, can you really win at baccarat, what is the house edge in baccarat, dan jangan lupa ini keren slot deposit pulsa tanpa potongan toko belum lagi ini how to play thai baccarat, how to beat baccarat strategy, how do you win in baccarat, best strategy baccarat, live casino thai, how do you win at baccarat, why is baccarat so addictive, belum lagi ini hebat slot withdraw terus forum yang juga hebat. Akhirnya, lihat ini luar biasa slot gacor 2022 toko and what are the house odds in baccarat, live casino thai, is bovada baccarat rigged, untuk memastikan ekstra. Lihat lainnya New Thai Ufabet222 Casino Info 5f57_ae |
|
|
|
|
Verfasst am: 26.03.2022 00:54 |
|
|
FrankJScott |
|
|
 |
Anmeldedatum: 04.08.2021 |
Beitrge: 4235 |
Wohnort: Time Travel |
|
|
 |
 |
 |
|
For the guy inquiring about personal injury law firm seo services, marketing legal issues, how much does the richest lawyer make, what is the richest lawyer, personal injury law firm marketing services, I highly recommend this new seo service for personal injury law firms site or examples of good digital marketing agency, which company is best for digital marketing job, what are the top 10 multi level marketing companies, chief marketing officer law firm jobs, digital marketing strategies for law firms, on top of this great marketing services for law firms info not to mention which course is best for digital marketing, best advertising law firms, legal marketing jobs toronto, best small law firm websites 2018, law firm marketing jobs toronto, as well as this updated marketing services for law firms info which is also great. Also have a look at this new seo for small law firms info on top of law firm business development job description, director of marketing law firm salary, marketing attorney salary, which country is best for digital marketing, internet marketing for small law firms, and don't forget this high rated seo for small law firms tips not to mention law firms big companies, internet marketing for small law firms, legal marketing jobs remote, best small law firms philadelphia, marketing plan for law firms, and don't forget excellent personal injury law firm seo services details which is also worth a look. I also suggest this useful seo service for personal injury law firms tips as well as best small law firms nyc, affiliate marketing legal issues, personal injury law firm marketing services, lawyer advertising examples, what is requirement for digital marketing, and don't forget this great attorney seo services tips and don't forget law marketing jobs, digital marketing for law firms, law firm marketing jobs toronto, law firm digital marketing services, law firm marketing ideas, alongside all high rated attorney seo services site which is also great. Finally, have a look at this great marketing services for law firms advice for good measure. Check more Top Rated CEN Aerospace Site 5a3e58d |
|
|
|
|
 | |  |
Verfasst am: 14.04.2022 03:42 |
|
|
wiildcat |
|
|
 |
Anmeldedatum: 20.03.2022 |
Beitrge: 36028 |
|
|
|
 |
 |
 |
|
|
|
|
|
 | |  |
Foren-bersicht » Netzwerksicherheit |
Du kannst keine Beitrge in dieses Forum schreiben. Du kannst auf Beitrge in diesem Forum nicht antworten. Du kannst deine Beitrge in diesem Forum nicht bearbeiten. Du kannst deine Beitrge in diesem Forum nicht lschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
Alle Zeiten sind GMT + 1 Stunde
Seite 2 von 2
Gehe zu Seite Zurck 1, 2
|
|
|
|