abclinuxu.cz AbcLinuxu.cz itbiz.cz ITBiz.cz HDmag.cz HDmag.cz abcprace.cz AbcPráce.cz
AbcLinuxu hledá autory!
Inzerujte na AbcPráce.cz od 950 Kč
Rozšířené hledání
×
    dnes 20:11 | Zajímavý software

    Desktopové prostředí Xfce bude mít vlastní kompozitor pro Wayland s názvem xfwl4. V programovacím jazyce Rust s využitím stavebních bloků z projektu Smithay jej napíše Brian Tarricone. Úprava stávajícího xfwm4 tak, aby paralelně podporoval X11 i Wayland, se ukázala jako špatná cesta.

    Ladislav Hagara | Komentářů: 2
    dnes 19:11 | Komunita

    Desktopové prostředí KDE Plasma 6.8 poběží už pouze nad Waylandem. Vývojáři, kteří s rozhodnutím nesouhlasí, vytvořili fork KDE Plasma s názvem SonicDE (Sonic Desktop Environment) s cílem zachovat a vylepšovat podporu X11.

    Ladislav Hagara | Komentářů: 3
    dnes 12:22 | Nová verze

    Byla vydána nová stabilní verze 7.8 dnes již jedenáctiletého webového prohlížeče Vivaldi (Wikipedie). Postavena je na Chromiu 144. Přehled novinek i s náhledy v příspěvku na blogu.

    Ladislav Hagara | Komentářů: 4
    dnes 10:33 | Nová verze

    GNU gettext (Wikipedie), tj. sada nástrojů pro psaní vícejazyčných programů, dospěl do verze 1.0. Po více než 30 letech vývoje. Přehled novinek v souboru NEWS.

    Ladislav Hagara | Komentářů: 1
    dnes 05:11 | IT novinky

    Chris Kühl (CEO), Christian Brauner (CTO) a Lennart Poettering (Chief Engineer) představili svou společnost Amutable. Má přinést determinismus a ověřitelnou integritu do linuxových systémů.

    Ladislav Hagara | Komentářů: 12
    včera 20:11 | Nová verze

    Byla vydána (𝕏) nová verze 26.1 open source firewallové a routovací platformy OPNsense (Wikipedie). Jedná se o fork pfSense postavený na FreeBSD. Kódový název OPNsense 26.1 je Witty Woodpecker. Přehled novinek v příspěvku na fóru.

    Ladislav Hagara | Komentářů: 2
    včera 15:11 | Zajímavý projekt

    Deník TO spustil vlastní zpravodajský webový portál ToHledej.CZ s internetovým vyhledávačem a bezplatnou e-mailovou schránkou. Dle svého tvrzení nabízí 'Zprávy, komentáře, analýzy bez cenzury' a 'Mail bez šmírování a Velkého bratra'. Rozložením a vizuálním stylem se stránky nápadně podobají portálu Seznam.cz a nejspíše je cílem být jeho alternativou. Z podmínek platformy vyplývá, že portál využívá nespecifikovaný internetový vyhledávač třetí strany.

    NUKE GAZA! 🎆 | Komentářů: 27
    včera 14:11 | Zajímavý projekt

    Computer History Museum (Muzeum historie počítačů) zpřístupnilo své sbírky veřejnosti formou online katalogu. Virtuálně si tak můžeme prohlédnout 'rozsáhlou sbírku archivních materiálů, předmětů a historek a seznámit se s vizionáři, inovacemi a neznámými příběhy, které revolučním způsobem změnily náš digitální svět'.

    NUKE GAZA! 🎆 | Komentářů: 12
    včera 14:00 | Zajímavý projekt

    Ruský hacker VIK-on si sestavil vlastní 32GB DDR5 RAM modul z čipů získaných z notebookových 16GB SO-DIMM RAM pamětí. Modul běží na 6400 MT/s a celkové náklady byly přibližně 218 dolarů, což je zhruba třetina současné tržní ceny modulů srovnatelných parametrů.

    NUKE GAZA! 🎆 | Komentářů: 15
    včera 11:00 | Upozornění

    Národní identitní autorita (NIA), která ovlivňuje přihlašování prostřednictvím NIA ID, MEP, eOP a externích identit (např. BankID), je částečně nedostupná.

    Ladislav Hagara | Komentářů: 9
    Které desktopové prostředí na Linuxu používáte?
     (17%)
     (6%)
     (0%)
     (10%)
     (24%)
     (3%)
     (5%)
     (2%)
     (12%)
     (33%)
    Celkem 667 hlasů
     Komentářů: 22, poslední dnes 23:06
    Rozcestník

    Where the de-SNAT actually takes place?

    22.8.2006 09:45 | Přečteno: 1314×

    Následující citace z USENET skupiny gmane.comp.security.firewalls.netfilter.general vysvětluje, proč ne všechny [de-]{S,D}NATované pakety procházejí {PRE,POST}ROUTING řetězcem.

    longraider a écrit :
    >
    > linux-2.6.14.2 with imq patch
    > eth0 - iface where two inet connections are attached
    > eth1 - server
    > eth2 - LAN
    > There is SNAT involved on one net connection. The other conn is for
    > servers, and there is proxy-arp active (at eth0 and eth1).
    >
    > I type:
    > iptables -t nat -A PREROUTING -i eth0 -j LOG
    > And after that, dmesg shows something like that:
    > 17:08:53 IN=eth0 OUT= SRC=some_remote_IP DST=IP_of_the_linux_box
    >
    > Shouldn't be there DST=10.0.0.5 for example (ie. de-SNATed)?
    
    This packet probably does not belong to a SNAT-ed or MASQ-ed connection.
    Actually, with this rule you won't see the return packets belonging to your
    SNAT-ed connection. In short, the 'nat' table chains only see the first packet 
    of a "connection", and only if it has the state NEW (not RELATED). All the 
    subsequent valid packets belonging or related to that connection (state NEW, 
    ESTABLISHED, or RELATED) don't go through theses chains. The action taken by 
    these packets is automatically determined by the NAT operation applied to the 
    first packet and the direction of the packet.
    
    For instance, with this rule :
    iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 1.2.3.4
    
    The first 'direct' packet of an outgoing connection on eth0 goes through the nat
    POSTROUTING chains and matches this rule, so the SNAT operation is applied.
    Instead of going through the POSTROUTING chain, the subsequent direct packets 
    (in the same direction) of the connection will automatically be applied the
    same SNAT operation. The return packets (in the opposite direction) of the 
    connection will automatically be applied the de-SNAT operation instead of going 
    through the nat PREROUTING chain. By the way, the subsequent packets of the 
    connection don't need to go in or out eth0 (funny, huh ?) to be properly NATed.
    
    > And all that I want to do is ingress queuing using IMQ. I want to fwmark
    > packets according to their de-SNATed destination adress (and some other
    > things also), and then put them into the IMQ ingress queue.
    > I could use the packet matching available in the ingress queue itself
    > (by ip tool), but I don't know if the packets that go into IMQ are
    > de-SNATed or not.
    >
    > So, where the de-SNAT actually takes place?
    
    De-SNAT takes place in the NF_IP_PRE_ROUTING Netfilter hook at the same place as
    the nat PREROUTING chain, after the mangle PREROUTING chain and before the 
    input routing decision.
    
    For DNAT which occured in the PREROUTING chain, de-DNAT takes place in the 
    NF_IP_POST_ROUTING Netfilter hook, at the same place as the nat POSTROUTING 
    chain, after the mangle POSTROUTING chain.
    
    For DNAT which occured in the OUTPUT chain, I observed that de-DNAT takes place 
    in the NF_IP_LOCAL_IN Netfilter hook, after the mangle and filter INPUT chains.
    
    
    > BTW is this diagram correct?
    > http://www.docum.org/docum.org/kptd/
    
    I think so, at least for the pure Netfilter part which matches my own diagram
    http://www.plouf.fr.eu.org/bazar/netfilter/schema_netfilter.txt. I don't know
     about the IMQ and QoS parts.
    
    > I think not, since traversing the magle PREROUTING can't occur
    > simulatenously with de-MASQ.
    
    Incoming packets traverse the mangle PREROUTING chain just before being 
    de-MASQ-ed if needed.
    
    > And is this de-MASQUERADE a de-SNAT also?
    
    Yes. Actually MASQUERADE and SNAT are similar, the only difference being in the 
    choice of the new source address.
    
    De-MASQ and de-SNAT both are destination address rewrite operations, so it is 
    consistent that they take place in the same place as the nat PREROUTING chain 
    which performs DNAT. But keep in mind that they take place *instead* of 
    trversing the nat PREROUTING chain, so you will never see packets being 
    de-MASQ-ed or de-SNAT-ed in any nat chain.
    
           

    Hodnocení: 56 %

            špatnédobré        

    Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

    Komentáře

    Vložit další komentář

    22.8.2006 13:52 maleprase | skóre: 28
    Rozbalit Rozbalit vše Re: Where the de-SNAT actually takes place?
    tohle je presne to co sem potreboval vedet

    resil jsem nekolik dni padani cdma. problem byl v tom ze i pres pravidlo -A POSTROUTING -o ppp0 -j MASQUERADE dochazelo k tomu ze se na ppp0 objevovaly sem tam pakety s neprelozenou adresou a modem zavesil.

    zjistil sem ze je to tim ze pakety ve stavu INVALID pres retezec POSTROUTING vubec neprochazi a je tudiz nutne je filtrovat na FORWARDu.
    22.8.2006 15:15 petr_p | skóre: 59 | blog: pb
    Rozbalit Rozbalit vše Re: Where the de-SNAT actually takes place?
    Ja vim, taky mi trvalo, nez jsem na to prisel :-[
    ISSN 1214-1267   www.czech-server.cz
    © 1999-2015 Nitemedia s. r. o. Všechna práva vyhrazena.