Port Weiterleitung
Hallo zusammen
folgende problematik
Debian Linux mit externer IP an eth0 62.157.94.10
Monitoring icinga
soll Server in Internen Netzen überwachen über das Internet überwachen
bei den Meisten check_...kann ich einen Port mit angeben
jedoch beim check_ipmi_sensors klappt das nicht
lösungsansatz
ich verwende eine virtuelle interne ip ( z.b. 192.168.200.11 geht an port udp 623 an eth1:11
und schicke diese über die Firewall raus auf Ziel 217.91.20.179 port 10024 und von dort intern weitergeleitet
Netzwerkkarten
es kommt nichts an,
was habe ich übersehen ??
++++++++++++++++++++
eth0 Link encap:Ethernet Hardware Adresse 00:0c:29:8f:d8:0c
inet Adresse:62.157.94.10 Bcast:62.157.94.255 Maske:255.255.255.0
inet6-Adresse: fe80::20c:29ff:fe8f:d80c/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:23173894 errors:0 dropped:0 overruns:0 frame:0
TX packets:22371464 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:18015641396 (16.7 GiB) TX bytes:3404582436 (3.1 GiB)
eth1 Link encap:Ethernet Hardware Adresse 00:0c:29:8f:d8:16
inet Adresse:192.168.200.10 Bcast:192.168.200.255 Maske:255.255.255.0
inet6-Adresse: fe80::20c:29ff:fe8f:d816/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:2280 (2.2 KiB) TX bytes:468 (468.0 B)
eth1:11 Link encap:Ethernet Hardware Adresse 00:0c:29:8f:d8:16
inet Adresse:192.168.200.11 Bcast:192.168.200.255 Maske:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
lo Link encap:Lokale Schleife
inet Adresse:127.0.0.1 Maske:255.0.0.0
inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
UP LOOPBACK RUNNING MTU:16436 Metrik:1
RX packets:166548 errors:0 dropped:0 overruns:0 frame:0
TX packets:166548 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX bytes:22067791 (21.0 MiB) TX bytes:22067791 (21.0 MiB)
# Generated by iptables-save v1.4.8 on Tue Sep 18 20:56:28 2012
*mangle
REROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
OSTROUTING ACCEPT [0:0]
COMMIT
# Completed on Tue Sep 18 20:56:28 2012
# Generated by iptables-save v1.4.8 on Tue Sep 18 20:56:28 2012
*nat
:OUTPUT ACCEPT [0:0]
REROUTING ACCEPT [0:0]
OSTROUTING ACCEPT [0:0]
-A PREROUTING -p udp -m udp -d 192.168.200.11 --dport 623 -j DNAT --to-destination 217.91.20.179:10024
# post1
-A POSTROUTING -s 192.168.200.11 -d 217.91.20.179 -j MASQUERADE
COMMIT
# Completed on Tue Sep 18 20:56:28 2012
# Generated by iptables-save v1.4.8 on Tue Sep 18 20:56:28 2012
*filter
:FORWARD ACCEPT [0:0]
:INPUT DROP [0:0]
:OUTPUT ACCEPT [0:0]
# Accept traffic from internal interfaces
-A INPUT ! -i eth0 -j ACCEPT
# Accept traffic with the ACK flag set
-A INPUT -p tcp -m tcp --tcp-flags ACK ACK -j ACCEPT
# Allow incoming data that is part of a connection we established
-A INPUT -m state --state ESTABLISHED -j ACCEPT
# Allow data that is related to existing connections
-A INPUT -m state --state RELATED -j ACCEPT
# Accept responses to DNS queries
-A INPUT -p udp -m udp --dport 1024:65535 --sport 53 -j ACCEPT
# Accept responses to our pings
-A INPUT -p icmp -m icmp --icmp-type echo-reply -j ACCEPT
# Accept notifications of unreachable hosts
-A INPUT -p icmp -m icmp --icmp-type destination-unreachable -j ACCEPT
# Accept notifications to reduce sending speed
-A INPUT -p icmp -m icmp --icmp-type source-quench -j ACCEPT
# Accept notifications of lost packets
-A INPUT -p icmp -m icmp --icmp-type time-exceeded -j ACCEPT
# Accept notifications of protocol problems
-A INPUT -p icmp -m icmp --icmp-type parameter-problem -j ACCEPT
# Allow connections to our SSH server
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
# Allow connections to our IDENT server
-A INPUT -p tcp -m tcp --dport auth -j ACCEPT
# Respond to pings
-A INPUT -p icmp -m icmp --icmp-type echo-request -j ACCEPT
# Protect our NFS server
-A INPUT -p tcp -m tcp --dport 2049:2050 -j DROP
# Protect our X11 display server
-A INPUT -p tcp -m tcp --dport 6000:6063 -j DROP
# Protect our X font server
-A INPUT -p tcp -m tcp --dport 7000:7010 -j DROP
# Allow connections to unprivileged ports
-A INPUT -p tcp -m tcp --dport 1024:65535 -j ACCEPT
COMMIT
# Completed on Tue Sep 18 20:56:28 2012
root@monitoring:/#
Hallo zusammen
folgende problematik
Debian Linux mit externer IP an eth0 62.157.94.10
Monitoring icinga
soll Server in Internen Netzen überwachen über das Internet überwachen
bei den Meisten check_...kann ich einen Port mit angeben
jedoch beim check_ipmi_sensors klappt das nicht
lösungsansatz
ich verwende eine virtuelle interne ip ( z.b. 192.168.200.11 geht an port udp 623 an eth1:11
und schicke diese über die Firewall raus auf Ziel 217.91.20.179 port 10024 und von dort intern weitergeleitet
Netzwerkkarten
es kommt nichts an,
was habe ich übersehen ??
++++++++++++++++++++
eth0 Link encap:Ethernet Hardware Adresse 00:0c:29:8f:d8:0c
inet Adresse:62.157.94.10 Bcast:62.157.94.255 Maske:255.255.255.0
inet6-Adresse: fe80::20c:29ff:fe8f:d80c/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:23173894 errors:0 dropped:0 overruns:0 frame:0
TX packets:22371464 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:18015641396 (16.7 GiB) TX bytes:3404582436 (3.1 GiB)
eth1 Link encap:Ethernet Hardware Adresse 00:0c:29:8f:d8:16
inet Adresse:192.168.200.10 Bcast:192.168.200.255 Maske:255.255.255.0
inet6-Adresse: fe80::20c:29ff:fe8f:d816/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:2280 (2.2 KiB) TX bytes:468 (468.0 B)
eth1:11 Link encap:Ethernet Hardware Adresse 00:0c:29:8f:d8:16
inet Adresse:192.168.200.11 Bcast:192.168.200.255 Maske:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
lo Link encap:Lokale Schleife
inet Adresse:127.0.0.1 Maske:255.0.0.0
inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
UP LOOPBACK RUNNING MTU:16436 Metrik:1
RX packets:166548 errors:0 dropped:0 overruns:0 frame:0
TX packets:166548 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX bytes:22067791 (21.0 MiB) TX bytes:22067791 (21.0 MiB)
# Generated by iptables-save v1.4.8 on Tue Sep 18 20:56:28 2012
*mangle
REROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
OSTROUTING ACCEPT [0:0]
COMMIT
# Completed on Tue Sep 18 20:56:28 2012
# Generated by iptables-save v1.4.8 on Tue Sep 18 20:56:28 2012
*nat
:OUTPUT ACCEPT [0:0]
REROUTING ACCEPT [0:0]
OSTROUTING ACCEPT [0:0]
-A PREROUTING -p udp -m udp -d 192.168.200.11 --dport 623 -j DNAT --to-destination 217.91.20.179:10024
# post1
-A POSTROUTING -s 192.168.200.11 -d 217.91.20.179 -j MASQUERADE
COMMIT
# Completed on Tue Sep 18 20:56:28 2012
# Generated by iptables-save v1.4.8 on Tue Sep 18 20:56:28 2012
*filter
:FORWARD ACCEPT [0:0]
:INPUT DROP [0:0]
:OUTPUT ACCEPT [0:0]
# Accept traffic from internal interfaces
-A INPUT ! -i eth0 -j ACCEPT
# Accept traffic with the ACK flag set
-A INPUT -p tcp -m tcp --tcp-flags ACK ACK -j ACCEPT
# Allow incoming data that is part of a connection we established
-A INPUT -m state --state ESTABLISHED -j ACCEPT
# Allow data that is related to existing connections
-A INPUT -m state --state RELATED -j ACCEPT
# Accept responses to DNS queries
-A INPUT -p udp -m udp --dport 1024:65535 --sport 53 -j ACCEPT
# Accept responses to our pings
-A INPUT -p icmp -m icmp --icmp-type echo-reply -j ACCEPT
# Accept notifications of unreachable hosts
-A INPUT -p icmp -m icmp --icmp-type destination-unreachable -j ACCEPT
# Accept notifications to reduce sending speed
-A INPUT -p icmp -m icmp --icmp-type source-quench -j ACCEPT
# Accept notifications of lost packets
-A INPUT -p icmp -m icmp --icmp-type time-exceeded -j ACCEPT
# Accept notifications of protocol problems
-A INPUT -p icmp -m icmp --icmp-type parameter-problem -j ACCEPT
# Allow connections to our SSH server
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
# Allow connections to our IDENT server
-A INPUT -p tcp -m tcp --dport auth -j ACCEPT
# Respond to pings
-A INPUT -p icmp -m icmp --icmp-type echo-request -j ACCEPT
# Protect our NFS server
-A INPUT -p tcp -m tcp --dport 2049:2050 -j DROP
# Protect our X11 display server
-A INPUT -p tcp -m tcp --dport 6000:6063 -j DROP
# Protect our X font server
-A INPUT -p tcp -m tcp --dport 7000:7010 -j DROP
# Allow connections to unprivileged ports
-A INPUT -p tcp -m tcp --dport 1024:65535 -j ACCEPT
COMMIT
# Completed on Tue Sep 18 20:56:28 2012
root@monitoring:/#