Sie sind nicht angemeldet.

1

24.11.2009, 13:59

iptables probleme

Servus,

ich will diverse Ports für externen Zugriff freigeben. Seit einiger Zeit ist irgendein Kram mit dem Kernel und IPTables.
Das hier habe ich komplett durchgearbeitet: http://rmatthes.de/gentoo/de.gentoo-wiki…stallation.html

Zitat

dragon ~ # iptables -I INPUT -i eth0 -p TCP --sport 1024:65535 --dport 3306 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables: No chain/target/match by that name.
dragon ~ # iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
dragon ~ # modprobe ip_conntrack
FATAL: Module ip_conntrack not found.
dragon ~ # modprobe ip_tables
FATAL: Module ip_tables not found.
dragon ~ # modprobe ip_LOG
FATAL: Module ip_LOG not found.
dragon ~ # modprobe ip_log
FATAL: Module ip_log not found.
dragon ~ # modprobe ip_limit
FATAL: Module ip_limit not found.
dragon ~ # modprobe ipt_LOG
FATAL: Module ipt_LOG not found.
dragon ~ # modprobe ipt_limit
FATAL: Module ipt_limit not found.
dragon ~ # modprobe iptable_filter
FATAL: Module iptable_filter not found.
dragon ~ # modprobe iptable_mangle
FATAL: Module iptable_mangle not found.
dragon ~ # modprobe ipt_state
FATAL: Module ipt_state not found.
dragon ~ # modprobe ip_conntrack_ftp
FATAL: Module ip_conntrack_ftp not found.
dragon ~ # modprobe ip_conntrack
FATAL: Module ip_conntrack not found.
dragon ~ # modprobe iptable_nat
FATAL: Module iptable_nat not found.


Meine Kernel config schaut so aus:

Zitat

CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CT_ACCT=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_EVENTS=y
# CONFIG_NF_CT_PROTO_DCCP is not set
# CONFIG_NF_CT_PROTO_SCTP is not set
# CONFIG_NF_CT_PROTO_UDPLITE is not set
# CONFIG_NF_CONNTRACK_AMANDA is not set
CONFIG_NF_CONNTRACK_FTP=y
# CONFIG_NF_CONNTRACK_H323 is not set
CONFIG_NF_CONNTRACK_IRC=y
# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
# CONFIG_NF_CONNTRACK_PPTP is not set
# CONFIG_NF_CONNTRACK_SANE is not set
# CONFIG_NF_CONNTRACK_SIP is not set
# CONFIG_NF_CONNTRACK_TFTP is not set
CONFIG_NF_CT_NETLINK=y
CONFIG_NETFILTER_XTABLES=y
# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
# CONFIG_NETFILTER_XT_TARGET_MARK is not set
# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set
# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
# CONFIG_NETFILTER_XT_MATCH_ESP is not set
# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
# CONFIG_NETFILTER_XT_MATCH_HL is not set
# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
# CONFIG_NETFILTER_XT_MATCH_MAC is not set
# CONFIG_NETFILTER_XT_MATCH_MARK is not set
# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
# CONFIG_NETFILTER_XT_MATCH_REALM is not set
# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
# CONFIG_NETFILTER_XT_MATCH_STATE is not set
# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
# CONFIG_NETFILTER_XT_MATCH_STRING is not set
# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
# CONFIG_NETFILTER_XT_MATCH_TIME is not set
# CONFIG_NETFILTER_XT_MATCH_U32 is not set
# CONFIG_IP_VS is not set

#
# IP: Netfilter Configuration
#
CONFIG_NF_DEFRAG_IPV4=y
CONFIG_NF_CONNTRACK_IPV4=y
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=y
# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
# CONFIG_IP_NF_MATCH_AH is not set
# CONFIG_IP_NF_MATCH_ECN is not set
# CONFIG_IP_NF_MATCH_TTL is not set
CONFIG_IP_NF_FILTER=y
# CONFIG_IP_NF_TARGET_REJECT is not set
# CONFIG_IP_NF_TARGET_LOG is not set
# CONFIG_IP_NF_TARGET_ULOG is not set
# CONFIG_NF_NAT is not set
# CONFIG_IP_NF_MANGLE is not set
# CONFIG_IP_NF_TARGET_TTL is not set
# CONFIG_IP_NF_RAW is not set
# CONFIG_IP_NF_ARPTABLES is not set


Zitat

dragon ~ # uname -a
Linux dragon 2.6.30-gentoo-r8 #5 SMP Tue Nov 24 12:30:56 Local time zone must be set--see zic i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5600+ AuthenticAMD GNU/Linux[(quote]

Zitat

net-firewall/iptables
Available versions: 1.3.8-r3 1.4.0-r1 1.4.2-r2 1.4.3.2 ~1.4.4 ~1.4.5 {extensions imq ipv6 l7filter static}[(quote]
Was mich irritiert, iptables habe ich vorhin neu emerged, dennoch werden die beiden Useflags nicht aktiv...
net-firewall/iptables extensions l7filter


Füre jede Hilfe bin ich dankbar... die meisten online tuts sind veraltet (2001 + 2005 am häuftigsten)

2

24.11.2009, 14:48

Hi

zb

Zitat

dragon ~ # modprobe ip_tables
FATAL: Module ip_tables not found.
Ich würde diese Teile mal als Modul bauen, denn scheibar wird ja überprüft ob die Module geladen sind...

3

24.11.2009, 16:15

Das Funktioniert nun alles... nur etwas irritiert mich, ich hatte vergessen IPTables zu starten beim letzten reboot und habe versucht via HeidiSQL auf meinen MySQL server zu kommen...
und bekomme die gleiche fehlermeldung als sie die firewall an, dass ich keinen zugriff habe. woran kann das liegen?

edit: google meinte das skip-network aus der my.cnf auskommentieren.
gesagt getan nun kommt der fehler "-hostename von meinem pc- darf nicht auf den mysql server zugreifen" -.-'