Plesk Firewall greift nicht !!

Twister

New Member
Hm weis gar nicht wie ich anfangen soll, eigentlich reicht mir für meine zwecke die einstellmöglichkeiten der Plesk Firewall 10.4.4
Ich habe 2 IP Adressen
Code:
auto lo
iface lo inet loopback

# device: eth0
auto  eth0
iface eth0 inet static
  address   85.10.XXX.X1
  broadcast 85.10.XXX.XX
  netmask   255.255.255.224
  gateway   85.10.XXX.X

# default route to access subnet
up route add -net 85.10.XXX.0 netmask 255.255.255.224 gw 85.10.XXX.X eth0

iface eth0:1 inet static
	address 85.10.XXX.X2
	netmask 255.255.255.224
auto eth0:1

Jetzt wollt ich eigentlich nur alle Administrativen sachen über die eine Haupt IP laufen lassen und über die andere Virtuell IP normales Domain Hosting ( 3-4 ) das ist auch kein Problem läuft.

[EDIT]
jetzt möchte ich bestimmte Ports auf der HauptIP sperren und auf der Virtuellen freigeben
Dazu muss ich sagen ich wollte eigentlich nicht mehr mit iptables anfangen und habe in der Plesk Firewall
(Plesk-Verwaltungsoberfläche)
Code:
Von ausgewählten Quellen zulassen, von anderen verweigern
Die HauptIP eingetragen somit müsste ja normalerweise die andere IP dafür gesperrt sein. Leider ist dem nicht so er sperrt mir beide IPs

[/EDIT] vergesst den schmarrn was ich hier geschrieben habe wer lesen kann is klar im vorteil die Quelle wäre ja meine eigene IP
nichts desto trotz funktioniert meine iptables trotzdem nicht

Ich habe dann doch noch selber mit iptables versucht aber ich hatte leider keinen erfolg
Code:
#!/bin/sh
/etc/init.d/psa-firewall stop
/etc/init.d/psa-firewall start

#/sbin/iptables -D INPUT -p tcp --dport 8443 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 80 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 21 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 443 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 19002 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 10000 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 25 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 106 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 110 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 143 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 465 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 993 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 995 -j ACCEPT
#/sbin/iptables -D INPUT -p tcp --dport 3306 -j ACCEPT
/sbin/iptables -D INPUT -j DROP


# Zulassen

/sbin/iptables -A INPUT -p tcp -d 127.0.0.1 --dport 80 -j ACCEPT
/sbin/iptables -A INPUT -p tcp -d 127.0.0.1 --dport 21 -j ACCEPT
/sbin/iptables -A INPUT -p tcp -d 127.0.0.1 --dport 443 -j ACCEPT

###########################################################################
# Ports 8443
###########################################################################
# Accept
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 8443 -j ACCEPT
#
# Drop
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 8443 -j DROP
#
###########################################################################
# Ports 80
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 80 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 80 -j DROP
#

###########################################################################
###########################################################################
# Ports 21
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 21 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 21 -j DROP
#
###########################################################################
###########################################################################
# Ports 443
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 443 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 443 -j DROP
#
###########################################################################
###########################################################################
# Ports 19002
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 19002 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 19002 -j DROP
#
###########################################################################
###########################################################################
# Ports 10000
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 10000 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 10000 -j DROP
#
###########################################################################
###########################################################################
# Ports 25
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 25 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 25 -j DROP
#
###########################################################################
###########################################################################
# Ports 106
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 106 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 106 -j DROP
#
###########################################################################
###########################################################################
# Ports 110
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 110 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 110 -j DROP
#
###########################################################################
###########################################################################
# Ports 143
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 143 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 143 -j DROP
#
###########################################################################
###########################################################################
# Ports 465
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 465 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 465 -j DROP
#
###########################################################################
###########################################################################
# Ports 993
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 993 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 993 -j DROP
#
###########################################################################
###########################################################################
# Ports 995
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 995 -j ACCEPT
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 995 -j DROP
#
###########################################################################
###########################################################################
# Ports 3306
###########################################################################
# Accept
# Domain IP s
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#2 --dport 3306 -j DROP
#
# Drop
# Interface IP
/sbin/iptables -A INPUT -p tcp -d 85.10.###.#1 --dport 3306 -j DROP
#
###########################################################################

/sbin/iptables -A INPUT -j DROP

#/etc/init.d/fail2ban restart

wenn ich die gesperrte IP im Browser eintrage leitet er mich einfach auf meine HauptIP um. Eigentlich müsste er ja einen Verbindungsfehler anzeigen

gesperrt > nicht gesperrt
ip2:8443 > ip1:8443

meine HOSTS datei sieht so aus

### Hetzner Online AG installimage
# nameserver config
# IPv4
127.0.0.1 localhost
85.10.xxx.x1 domain.de
85.10.xxx.x2 domains.domain.de
der DNS läuft über Schlundtech

Ich weiss leider nicht mehr weiter bei meinem alten Server hat das alles funktioniert allerdings hatte ich da noch eigene Subnet IPs liegt es an der Virtuellen IP vielen Dank schonmal

Twister
 
Last edited by a moderator:
nur zusätzlich zu info

iptables-L

Code:
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
REJECT     tcp  --  anywhere             anywhere            tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset
DROP       all  --  anywhere             anywhere            state INVALID
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:12443
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:11443
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:11444
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8447
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8443
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8880
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp
DROP       tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:submission
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssmtp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3s
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:imap2
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:imaps
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:poppassd
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:mysql
DROP       tcp  --  anywhere             anywhere            tcp dpt:postgresql
DROP       tcp  --  anywhere             anywhere            tcp dpt:9008
DROP       tcp  --  anywhere             anywhere            tcp dpt:9080
DROP       udp  --  anywhere             anywhere            udp dpt:netbios-ns
DROP       udp  --  anywhere             anywhere            udp dpt:netbios-dgm
DROP       tcp  --  anywhere             anywhere            tcp dpt:netbios-ssn
DROP       tcp  --  anywhere             anywhere            tcp dpt:microsoft-ds
ACCEPT     udp  --  anywhere             anywhere            udp dpt:openvpn
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp type 8 code 0
ACCEPT     tcp  --  anywhere             localhost           tcp dpt:www
ACCEPT     tcp  --  anywhere             localhost           tcp dpt:ftp
ACCEPT     tcp  --  anywhere             localhost           tcp dpt:https
ACCEPT     tcp  --  anywhere             domain.de      	tcp dpt:8443
DROP       tcp  --  anywhere             domains.domain.de 	tcp dpt:8443
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:www
DROP       tcp  --  anywhere             domain.de      	tcp dpt:www
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:ftp
DROP       tcp  --  anywhere             domain.de      	tcp dpt:ftp
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:https
DROP       tcp  --  anywhere             domain.de      	tcp dpt:https
ACCEPT     tcp  --  anywhere             domain.de      	tcp dpt:19002
DROP       tcp  --  anywhere             domains.domain.de 	tcp dpt:19002
ACCEPT     tcp  --  anywhere             domain.de      	tcp dpt:webmin
DROP       tcp  --  anywhere             domains.domain.de 	tcp dpt:webmin
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:smtp
DROP       tcp  --  anywhere             domain.de      	tcp dpt:smtp
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:poppassd
DROP       tcp  --  anywhere             domain.de      	tcp dpt:poppassd
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:pop3
DROP       tcp  --  anywhere             domain.de      	tcp dpt:pop3
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:imap2
DROP       tcp  --  anywhere             domain.de      	tcp dpt:imap2
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:ssmtp
DROP       tcp  --  anywhere             domain.de      	tcp dpt:ssmtp
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:imaps
DROP       tcp  --  anywhere             domain.de      	tcp dpt:imaps
ACCEPT     tcp  --  anywhere             domains.domain.de 	tcp dpt:pop3s
DROP       tcp  --  anywhere             domain.de      	tcp dpt:pop3s
DROP       tcp  --  anywhere             domains.domain.de 	tcp dpt:mysql
DROP       tcp  --  anywhere             domain.de      	tcp dpt:mysql
DROP       all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
REJECT     tcp  --  anywhere             anywhere            tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset
DROP       all  --  anywhere             anywhere            state INVALID
ACCEPT     all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere

Chain OUTPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
REJECT     tcp  --  anywhere             anywhere            tcp flags:!FIN,SYN,RST,ACK/SYN reject-with tcp-reset
DROP       all  --  anywhere             anywhere            state INVALID
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
 
Nur mal als Hinweis:

Code:
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8443

Danach ist schluss mit iptables, accept is accept...
 
hm ich kann dir leider nicht folgen nach diesem eintrag kommen doch noch mehrer iptables einträge

ich versteh deine aussage " danach ist schluss " leider nicht nicht.

Vielen Dank
Gruss
 
hm ich kann dir leider nicht folgen nach diesem eintrag kommen doch noch mehrer iptables einträge

Die Einträge werden von oben nach untern durchlaufen.
Wenn einmal ein passender Eintrag gefunden wird (hier:[...] -j ACCEPT), wird dieser aktiv und das Paket geht durch.
Du müsstest das ganze also näher einschränken, damit nicht jedes Paket mit dem Dst-Port nach ACCEPT fällt.
 
Die Einträge werden von oben nach untern durchlaufen.
Wenn einmal ein passender Eintrag gefunden wird (hier:[...] -j ACCEPT), wird dieser aktiv und das Paket geht durch.
Du müsstest das ganze also näher einschränken, damit nicht jedes Paket mit dem Dst-Port nach ACCEPT fällt.

Das ist ja genau das was mich wundert wenn ich nurmal den port 19002 nehme auf der ersten IP gesperrt auf der zweiten IP (in Reihenfolge) blockiert und zum schluss ein Drop ganz unten. Ich habe kein ACCEPT für die zweite IP
Kann aber über beide Ports zugreiffen was mach ich den falsch ich blicks einfach nicht.

Code:
root@twisterchen ~ # iptables -L -v -n
Chain INPUT (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
 481K   85M ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
 4313  204K REJECT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:!0x17/0x02 reject-with tcp-reset
   21  1480 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0           state INVALID
 2278  137K ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:12443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:11443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:11444
    2   104 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:8447
 3029  181K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:8443
   15   780 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:8880
16097  895K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:80
  519 28932 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:443
   11   528 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:21
  214 11236 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:22
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:587
 1073 57464 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:25
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:465
  492 28544 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:110
   61  3172 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:995
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:143
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:993
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:106
  646 30872 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:3306
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:5432
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:9008
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:9080
    8   624 DROP       udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:137
 1556  379K DROP       udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:138
   33  1592 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:139
 3055  150K DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:445
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:1194
    3   190 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:53
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:53
   99 38104 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0
 4127  224K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0
  101  5076 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 8 code 0
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            127.0.0.1           tcp dpt:80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            127.0.0.1           tcp dpt:21
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            127.0.0.1           tcp dpt:443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:8443
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:8443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:80
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:21
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:21
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:443
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:19002
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:19002
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:10000
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:10000
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:25
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:25
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:106
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:106
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:110
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:110
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:143
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:143
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:465
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:465
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:993
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:993
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:995
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:995
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.21        tcp dpt:3306
    0     0 DROP       tcp  --  *      *       0.0.0.0/0            19.16.100.20        tcp dpt:3306
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    0     0 REJECT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:!0x17/0x02 reject-with tcp-reset
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0           state INVALID
    0     0 ACCEPT     all  --  lo     lo      0.0.0.0/0            0.0.0.0/0
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
 614K  512M ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
 3477  144K REJECT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:!0x17/0x02 reject-with tcp-reset
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0           state INVALID
 2278  137K ACCEPT     all  --  *      lo      0.0.0.0/0            0.0.0.0/0
 9064  913K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Vielen Dank
Twister
 
Vielleicht solltest Du Dir die Mühe machen die Ausgabe von iptables zu verstehen bzw. das was die anderen hier beigetragen haben.

Zirka in der Mitte Deiner INPUT-Regeln
Code:
   99 38104 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0
 4127  224K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0
  101  5076 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 8 code 0
werden alle TCP/UDP-Pakete ohne weitere Kriterien angenommen. Erst dann folgen Deine Regeln in Abhängigkeit der Zieladresse. An den Paket und Bytecountern siehst Du auch daß diese Regeln nie angesprungen werden.

Du hast vermutlich irgendwas verfrickelt und solltest Dich fragen wer Deine Firewall zuerst füttert.
 
auch wenn ihr mich in der luft zerreist

Ich verstehe mal folgendes :
IPTABLES werden der reihe nach abgearbeitet das heist wenn ich als erstes was akzeptiere und als zweites das gleiche drope dann wird es doch gedropt richtig ?

das habe ich schon gefunden

Code:
   99 38104 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0
 4127  224K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0
  101  5076 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0

nur habe ich auch ganz am schluss stehen
Code:
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0
das heist doch eigentlich, dass wenn es nach der reihenfolge geht dies die letzte regelt währe oder nicht

Gruss
Twister
 
NEIN! Das Anspringen von ACCEPT oder DROP beendet die Abarbeitung der Regeln, da die Bestimmung des Datenpaketes entschieden ist.

s.u. hier
 
Back
Top