Iptables lukker af for 127.0.0.1
Hey!Jeg bruger iptables som firewall på min server scriptet er lavet vha 1go med lidt tilføjelser:
#!/bin/sh
# iptables script generator: V0.1-2002
# Comes with no warranty!
# e-mail: michael@1go.dk
# Diable forwarding
echo 0 > /proc/sys/net/ipv4/ip_forward
LAN_IP_NET='192.168.0.1/24'
LAN_NIC='eth1'
WAN_IP='x.x.x.x'
WAN_NIC='eth0'
# load some modules (if needed)
modprobe ip_nat_ftp
modprobe ip_conntrack_ftp
# Flush
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
# Open ports on router for server/services
iptables -A INPUT -j ACCEPT -p tcp --dport 80
iptables -A INPUT -j ACCEPT -p tcp --dport 21
iptables -A INPUT -j ACCEPT -p tcp --dport 22
# Open for CS server
iptables -A INPUT -j ACCEPT -p udp --dport 27020
iptables -A INPUT -j ACCEPT -p udp --dport 27015
# iptables -A INPUT -j ACCEPT -p udp --dport 1200
# Open Ventrilo
iptables -A INPUT -j ACCEPT -p tcp --dport 3784
# STATE RELATED for router
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#ICMP tillader ping
iptables -A INPUT -p icmp -j ACCEPT
# Enable forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
Mit problem er at jeg fx ikke kan tilgå den lokale mysql server på 127.0.0.1 længere. Man må kunne putte noget i scriptet så den har alt åbnet på 127.0.0.1/localhost?
