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 00:22 | Komunita

    Vyjádřeni Software Freedom Conservancy (SFC) k porušování licence AGPLv3 společností Bambu Lab v jejich softwaru Bambu Studio pro 3D tisk. Bambu Studio vychází z PrusaSliceru. Ten zase z Slic3ru. Spuštěn byl projekt baltobu, který kombinuje několik strategií pro řešení problému. SFC zastřeší vývoj svobodné náhrady proprietární knihovny libbambu_networking pomocí reverzního inženýrství a reimplementace, forku OrcaSliceru pro Bambu Lab tiskárny od Paweła Jarczaka a forku celého Bambu Studia pod názvem Viscose.

    Ladislav Hagara | Komentářů: 0
    včera 22:44 | Nová verze

    Správce souborů GNOME Commander (Wikipedie) byl přepsán do Rustu a vydán v nové verzi 2.0.0.

    Ladislav Hagara | Komentářů: 0
    včera 19:44 | Nová verze

    Sway (Wikipedie), dlaždicový (tiling) správce oken pro Wayland kompatibilní s i3, byl vydán ve verzi 1.12. Do vývoje se zapojilo 50 vývojářů. Přehled novinek na GitHubu. Sway 1.12 závisí na wlroots 0.20.0.

    Ladislav Hagara | Komentářů: 0
    včera 16:33 | IT novinky

    Papež Lev XIV. ve své první encyklice Magnifica Humanitas (Skvělé lidství), která se věnuje umělé inteligenci (AI), varoval před dezinformacemi, které AI manipulací s obsahem vytváří. Moc mají podle něj sociální sítě ovládané hrstkou soukromníků. Upozornil také roli digitálních platforem v obchodování s lidmi, které podle něj musí být uznáno jako současná forma otroctví. Papež se také poprvé omluvil za roli, kterou Vatikán sehrál při legitimizaci otroctví, a za to, že jej po staletí neodsoudil.

    Ladislav Hagara | Komentářů: 0
    včera 16:11 | IT novinky

    Český telekomunikační úřad zveřejnil Výroční zprávu za rok 2025 (pdf), která shrnuje jeho hlavní aktivity v oblasti regulace elektronických komunikací, poštovních služeb, digitálních služeb a přípravy na dohled nad umělou inteligencí. Součástí zprávy jsou také data o vývoji trhu, včetně pokračujícího růstu spotřeby mobilních dat a rozšiřování sítí nové generace. Celkový objem přenesených mobilních dat dosáhl v roce 2025 přibližně

    … více »
    Ladislav Hagara | Komentářů: 0
    včera 16:00 | Nová verze

    Tým sdružení CZ.NIC vyvíjející routovacího daemona BIRD oznámil vydání nových verzí 3.3.0 a 2.19.0. Ty přinášejí podporu pro EVPN/VXLAN a automatizaci BGP na základě router advertisementů. Více informací je k dispozici v archivu uživatelského mailing-listu.

    VSladek | Komentářů: 0
    24.5. 04:33 | Nová verze

    Open source software pro úpravu digitálních fotografií LightZone (Wikipedie) byl vydán v nové verzi 5.0.0. LightZone je dnes k dispozici pod licencí BSD. Původně se jednalo o proprietární software vyvíjený společností Light Crafts. Ta v prosinci 2012 souhlasila s uvolněním zdrojových kódů jako open source [Wayback Machine].

    Ladislav Hagara | Komentářů: 0
    23.5. 17:22 | Nová verze

    Byla vydána verze 0.84 telnet a ssh klienta PuTTY (Wikipedie). Podrobnosti v přehledu nových vlastností a oprav chyb a Change Logu.

    Ladislav Hagara | Komentářů: 2
    22.5. 19:44 | IT novinky

    Microsoft představil Azure Linux 4.0 a Azure Container Linux. Na konferenci Open Source Summit North America 2026 organizované konsorciem Linux Foundation a sponzorované také Microsoftem. Azure Linux 4.0 vychází z Fedora Linuxu. Azure Container Linux je založen na projektu Flatcar. Azure Linux (GitHub, Wikipedie) byl původně znám jako CBL-Mariner.

    Ladislav Hagara | Komentářů: 0
    22.5. 12:22 | Zajímavý článek

    Nové číslo časopisu Raspberry Pi zdarma ke čtení: Raspberry Pi Official Magazine 165 (pdf).

    Ladislav Hagara | Komentářů: 0
    Které desktopové prostředí na Linuxu používáte?
     (12%)
     (8%)
     (2%)
     (14%)
     (31%)
     (4%)
     (6%)
     (3%)
     (16%)
     (26%)
    Celkem 1711 hlasů
     Komentářů: 30, poslední 3.4. 20:20
    Rozcestník

    Administrace komentářů

    Jste na stránce určené pro řešení chyb a problémů týkajících se diskusí a komentářů. Můžete zde našim administrátorům reportovat špatně zařazenou či duplicitní diskusi, vulgární či osočující příspěvek a podobně. Děkujeme vám za vaši pomoc, více očí více vidí, společně můžeme udržet vysokou kvalitu AbcLinuxu.cz.

    Příspěvek
    8.4.2010 20:20 firewall
    Rozbalit Rozbalit vše Re: Firewall a bridge

    #!/bin/sh
    SYSCTL="/sbin/sysctl -w"
    IPT="/sbin/iptables"
    IPTS="/sbin/iptables-save"
    IPTR="/sbin/iptables-restore"

    INET_IFACE="eth0"
    INET_IFACE1="vlan73"
    INET_IFACE2="eth1"
    INET_IFACE3="br0"
    INET_IFACE4="vnet0"

    LO_IFACE="lo"
    LO_IP="127.0.0.1"
    if [ "$1" = "save" ]
    then
    echo -n "Saving firewall to /etc/sysconfig/iptables ... "
    $IPTS > /etc/sysconfig/iptables
    echo "done"
    exit 0
    elif [ "$1" = "restore" ]
    then
    echo -n "Restoring firewall from /etc/sysconfig/iptables ... "
    $IPTR < /etc/sysconfig/iptables
    echo "done"
    exit 0
    fi

    if [ "$SYSCTL" = "" ]
    then
    echo "1" > /proc/sys/net/ipv4/tcp_syncookies
    else
    $SYSCTL net.ipv4.tcp_syncookies="1"
    fi

    if [ "$SYSCTL" = "" ]
    then
    echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter
    else
    $SYSCTL net.ipv4.conf.all.rp_filter="1"
    fi

    if [ "$SYSCTL" = "" ]
    then
    echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
    else
    $SYSCTL net.ipv4.icmp_echo_ignore_broadcasts="1"
    fi

    if [ "$SYSCTL" = "" ]
    then
    echo "0" > /proc/sys/net/ipv4/conf/all/accept_source_route
    else
    $SYSCTL net.ipv4.conf.all.accept_source_route="0"
    fi

    if [ "$SYSCTL" = "" ]
    then
    echo "1" > /proc/sys/net/ipv4/conf/all/secure_redirects
    else
    $SYSCTL net.ipv4.conf.all.secure_redirects="1"
    fi

    if [ "$SYSCTL" = "" ]
    then
    echo "1" > /proc/sys/net/ipv4/conf/all/log_martians
    else
    $SYSCTL net.ipv4.conf.all.log_martians="0"
    fi


    ###############################################################################
    #
    # Flush Any Existing Rules or Chains
    #

    echo "Flushing Tables ..."

    # Reset Default Policies
    $IPT -P INPUT ACCEPT
    $IPT -P FORWARD ACCEPT
    $IPT -P OUTPUT ACCEPT
    $IPT -t nat -P PREROUTING ACCEPT
    $IPT -t nat -P POSTROUTING ACCEPT
    $IPT -t nat -P OUTPUT ACCEPT
    $IPT -t mangle -P PREROUTING ACCEPT
    $IPT -t mangle -P OUTPUT ACCEPT

    # Flush all rules
    $IPT -F
    $IPT -t nat -F
    $IPT -t mangle -F

    # Erase all non-default chains
    $IPT -X
    $IPT -t nat -X
    $IPT -t mangle -X

    if [ "$1" = "stop" ]
    then
    echo "Firewall completely flushed!  Now running with no firewall."
    exit 0
    fi

    ###############################################################################
    #
    # Rules Configuration
    #

    ###############################################################################
    #
    # Filter Table
    #
    ###############################################################################

    # Set Policies

    $IPT -P INPUT DROP
    $IPT -P OUTPUT DROP
    $IPT -P FORWARD DROP

    ###############################################################################
    #
    # User-Specified Chains
    #
    # Create user chains to reduce the number of rules each packet
    # must traverse.

    echo "Create and populate custom rule chains ..."

    # Create a chain to filter INVALID packets

    $IPT -N bad_packets

    # Create another chain to filter bad tcp packets

    $IPT -N bad_tcp_packets

    # Create separate chains for icmp, tcp (incoming and outgoing),
    # and incoming udp packets.

    $IPT -N icmp_packets

    # Used for UDP packets inbound from the Internet
    $IPT -N udp_inbound

    # Used to block outbound UDP services from internal network
    # Default to allow all
    $IPT -N udp_outbound

    # Used to allow inbound services if desired
    # Default fail except for established sessions
    $IPT -N tcp_inbound

    # Used to block outbound services from internal network
    # Default to allow all
    $IPT -N tcp_outbound

    ###############################################################################
    #
    # Populate User Chains
    #

    # bad_packets chain
    #
    $IPT -A bad_packets -p ALL -m state --state INVALID -j DROP

    # Then check the tcp packets for additional problems
    $IPT -A bad_packets -p tcp -j bad_tcp_packets

    # All good, so return
    $IPT -A bad_packets -p ALL -j RETURN

    # bad_tcp_packets chain
    #
    # All tcp packets will traverse this chain.
    # Every new connection attempt should begin with
    # a syn packet.  If it doesn't, it is likely a
    # port scan.  This drops packets in state
    # NEW that are not flagged as syn packets.

    $IPT -A bad_tcp_packets -p tcp ! --syn -m state --state NEW -j DROP
    $IPT -A bad_tcp_packets -p tcp --tcp-flags ALL NONE -j DROP
    $IPT -A bad_tcp_packets -p tcp --tcp-flags ALL ALL -j DROP
    $IPT -A bad_tcp_packets -p tcp --tcp-flags ALL FIN,URG,PSH -j DROP
    $IPT -A bad_tcp_packets -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j DROP
    $IPT -A bad_tcp_packets -p tcp --tcp-flags SYN,RST SYN,RST -j DROP
    $IPT -A bad_tcp_packets -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP

    # All good, so return
    $IPT -A bad_tcp_packets -p tcp -j RETURN

    # icmp_packets chain
    #
    # This chain is for inbound (from the Internet) icmp packets only.
    # Type 8 (Echo Request) is not accepted by default
    # Enable it if you want remote hosts to be able to reach you.
    # 11 (Time Exceeded) is the only one accepted
    # that would not already be covered by the established
    # connection rule.  Applied to INPUT on the external interface.
    #
    # See: http://www.ee.siue.edu/~rwalden/networking/icmp.html
    # for more info on ICMP types.
    #
    # Note that the stateful settings allow replies to ICMP packets.
    # These rules allow new packets of the specified types.

    # ICMP packets should fit in a Layer 2 frame, thus they should
    # never be fragmented.  Fragmented ICMP packets are a typical sign
    $IPT -A icmp_packets --fragment -p ICMP -j DROP

    # Echo - uncomment to allow your system to be pinged.
    # Uncomment the LOG command if you also want to log PING attempts
    #
    # $IPT -A icmp_packets -p ICMP -s 0/0 --icmp-type 8 -j LOG \
    #    --log-prefix "Ping detected: "
    $IPT -A icmp_packets -p ICMP -s 0/0 --icmp-type 8 -j ACCEPT

    # By default, however, drop pings without logging. Blaster
    # and other worms have infected systems blasting pings.
    # Comment the line below if you want pings logged, but it
    # will likely fill your logs.
    $IPT -A icmp_packets -p ICMP -s 0/0 --icmp-type 8 -j DROP

    # Time Exceeded
    $IPT -A icmp_packets -p ICMP -s 0/0 --icmp-type 11 -j ACCEPT

    # Not matched, so return so it will be logged
    $IPT -A icmp_packets -p ICMP -j RETURN

    # TCP & UDP
    # Identify ports at:
    #    http://www.chebucto.ns.ca/~rakerman/port-table.html
    #    http://www.iana.org/assignments/port-numbers

    # udp_inbound chain
    #
    # This chain describes the inbound UDP packets it will accept.
    # It's applied to INPUT on the external or Internet interface.
    # Note that the stateful settings allow replies.
    # These rules are for new requests.
    # It drops netbios packets (windows) immediately without logging.

    # Drop netbios calls
    # Please note that these rules do not really change the way the firewall
    # treats netbios connections.  Connections from the localhost and
    # internal interface (if one exists) are accepted by default.
    # Responses from the Internet to requests initiated by or through
    # the firewall are also accepted by default.  To get here, the
    # packets would have to be part of a new request received by the
    # Internet interface.  You would have to manually add rules to
    # accept these.  I added these rules because some network connections,
    # such as those via cable modems, tend to be filled with noise from
    # unprotected Windows machines.  These rules drop those packets
    # quickly and without logging them.  This prevents them from traversing
    # the whole chain and keeps the log from getting cluttered with
    # chatter from Windows systems.
    $IPT -A udp_inbound -p UDP -s 0/0 --destination-port 137 -j DROP
    $IPT -A udp_inbound -p UDP -s 0/0 --destination-port 138 -j DROP

    # DNS Server
    # Configure the server to use port 53 as the source port for requests
    # Note, if you run a caching-only name server that only accepts queries
    # from the private network or localhost, you can comment out this line.
    $IPT -A udp_inbound -p UDP -s 0/0 --destination-port 53 -j ACCEPT

    # If you don't query-source the server to port 53 and you have problems,
    # uncomment this rule.  It specifically allows responses to queries
    # initiated to another server from a high UDP port.  The stateful
    # connection rules should handle this situation, though.
    # $IPT -A udp_inbound -p UDP -s 0/0 --source-port 53 -j ACCEPT

    # Dynamic Address
    # If DHCP, the initial request is a broadcast. The response
    # doesn't exactly match the outbound packet.  This explicitly
    # allow the DHCP ports to alleviate this problem.
    # If you receive your dynamic address by a different means, you
    # can probably comment this line.
    $IPT -A udp_inbound -p UDP -s 0/0 --source-port 67 --destination-port 68 \
    -j ACCEPT

    # User specified allowed UDP protocol
    $IPT -A udp_inbound -p UDP -s 0/0 --destination-port 3306 -j ACCEPT


    # Not matched, so return for logging
    $IPT -A udp_inbound -p UDP -j RETURN

    # udp_outbound chain
    #
    # This chain is used with a private network to prevent forwarding for
    # UDP requests on specific protocols.  Applied to the FORWARD rule from
    # the internal network.  Ends with an ACCEPT


    # No match, so ACCEPT
    $IPT -A udp_outbound -p UDP -s 0/0 -j ACCEPT

    # tcp_inbound chain
    #
    # This chain is used to allow inbound connections to the
    # system/gateway.  Use with care.  It defaults to none.
    # It's applied on INPUT from the external or Internet interface.

    # DNS Server - Allow TCP connections (zone transfers and large requests)
    # This is disabled by default.  DNS Zone transfers occur via TCP.
    # If you need to allow transfers over the net you need to uncomment this line.
    # If you allow queries from the 'net, you also need to be aware that although
    # DNS queries use UDP by default, a truncated UDP query can legally be
    # submitted via TCP instead.  You probably will never need it, but should
    # be aware of the fact.
    # $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 53 -j ACCEPT

    # Web Server

    # HTTP
    $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 80 -j ACCEPT

    # HTTPS (Secure Web Server)
    $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 443 -j ACCEPT

    # sshd
    $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 22 -j ACCEPT

    # vnc
    $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 5901 -j ACCEPT

    # User specified allowed UDP protocol
    $IPT -A tcp_inbound -p TCP -s 0/0 --destination-port 3306 -j ACCEPT


    # Not matched, so return so it will be logged
    $IPT -A tcp_inbound -p TCP -j RETURN

    # tcp_outbound chain
    #
    # This chain is used with a private network to prevent forwarding for
    # requests on specific protocols.  Applied to the FORWARD rule from
    # the internal network.  Ends with an ACCEPT


    # No match, so ACCEPT
    $IPT -A tcp_outbound -p TCP -s 0/0 -j ACCEPT

    ###############################################################################
    #
    # INPUT Chain
    #

    echo "Process INPUT chain ..."

    # Allow all on localhost interface
    $IPT -A INPUT -p ALL -i $LO_IFACE -j ACCEPT
    $IPT -A INPUT -p ALL -i $INET_IFACE1 -j ACCEPT
    $IPT -A INPUT -p ALL -i $INET_IFACE2 -j ACCEPT
    $IPT -A INPUT -p ALL -i $INET_IFACE3 -j ACCEPT
    $IPT -A INPUT -p ALL -i $INET_IFACE4 -j ACCEPT

    # Drop bad packets
    $IPT -A INPUT -p ALL -j bad_packets

    # DOCSIS compliant cable modems
    # Some DOCSIS compliant cable modems send IGMP multicasts to find
    # connected PCs.  The multicast packets have the destination address
    # 224.0.0.1.  You can accept them.  If you choose to do so,
    # Uncomment the rule to ACCEPT them and comment the rule to DROP
    # them  The firewall will drop them here by default to avoid
    # cluttering the log.  The firewall will drop all multicasts
    # to the entire subnet (224.0.0.1) by default.  To only affect
    # IGMP multicasts, change '-p ALL' to '-p 2'.  Of course,
    # if they aren't accepted elsewhere, it will only ensure that
    # multicasts on other protocols are logged.
    # Drop them without logging.
    $IPT -A INPUT -p ALL -d 224.0.0.1 -j DROP
    # The rule to accept the packets.
    # $IPT -A INPUT -p ALL -d 224.0.0.1 -j ACCEPT


    # Inbound Internet Packet Rules

    # Accept Established Connections
    $IPT -A INPUT -p ALL -i $INET_IFACE -m state --state ESTABLISHED,RELATED  -j ACCEPT

    # Route the rest to the appropriate user chain
    $IPT -A INPUT -p TCP -i $INET_IFACE -j tcp_inbound
    $IPT -A INPUT -p UDP -i $INET_IFACE -j udp_inbound
    $IPT -A INPUT -p ICMP -i $INET_IFACE -j icmp_packets

    # Drop without logging broadcasts that get this far.
    # Cuts down on log clutter.
    # Comment this line if testing new rules that impact
    # broadcast protocols.
    $IPT -A INPUT -m pkttype --pkt-type broadcast -j DROP

    ###############################################################################
    #
    # FORWARD Chain
    #

    echo "Process FORWARD chain ..."

    # Used if forwarding for a private network


    ###############################################################################
    #
    # OUTPUT Chain
    #

    echo "Process OUTPUT chain ..."

    # Generally trust the firewall on output

    # However, invalid icmp packets need to be dropped
    # to prevent a possible exploit.
    $IPT -A OUTPUT -m state -p icmp --state INVALID -j DROP

    # Localhost
    $IPT -A OUTPUT -p ALL -s $LO_IP -j ACCEPT
    $IPT -A OUTPUT -p ALL -o $LO_IFACE -j ACCEPT

    # To internet
    $IPT -A OUTPUT -p ALL -o $INET_IFACE -j ACCEPT
    $IPT -A OUTPUT -p ALL -o $INET_IFACE1 -j ACCEPT
    $IPT -A OUTPUT -p ALL -o $INET_IFACE2 -j ACCEPT
    $IPT -A OUTPUT -p ALL -o $INET_IFACE3 -j ACCEPT
    $IPT -A OUTPUT -p ALL -o $INET_IFACE4 -j ACCEPT

    ###############################################################################
    #
    # nat table
    #
    ###############################################################################

    # The nat table is where network address translation occurs if there
    # is a private network.  If the gateway is connected to the Internet
    # with a static IP, snat is used.  If the gateway has a dynamic address,
    # masquerade must be used instead.  There is more overhead associated
    # with masquerade, so snat is better when it can be used.
    # The nat table has a builtin chain, PREROUTING, for dnat and redirects.
    # Another, POSTROUTING, handles snat and masquerade.

    echo "Load rules for nat table ..."

    ###############################################################################
    #
    # PREROUTING chain
    #


    ###############################################################################
    #
    # POSTROUTING chain
    #


    ###############################################################################
    #
    # mangle table
    #
    ###############################################################################

    # The mangle table is used to alter packets.  It can alter or mangle them in
    # several ways.  For the purposes of this generator, we only use its ability
    # to alter the TTL in packets.  However, it can be used to set netfilter
    # mark values on specific packets.  Those marks could then be used in another
    # table like filter, to limit activities associated with a specific host, for
    # instance.  The TOS target can be used to set the Type of Service field in
    # the IP header.  Note that the TTL target might not be included in the
    # distribution on your system.  If it is not and you require it, you will
    # have to add it.  That may require that you build from source.

    echo "Load rules for mangle table ..."

    Cez bridge mi nechce prejst WAN.

    V tomto formuláři můžete formulovat svou stížnost ohledně příspěvku. Nejprve vyberte typ akce, kterou navrhujete provést s diskusí či příspěvkem. Potom do textového pole napište důvody, proč by měli admini provést vaši žádost, problém nemusí být patrný na první pohled. Odkaz na příspěvek bude přidán automaticky.

    Vaše jméno
    Váš email
    Typ požadavku
    Slovní popis
    ISSN 1214-1267   www.czech-server.cz
    © 1999-2015 Nitemedia s. r. o. Všechna práva vyhrazena.