T
theexplainer
Grünschnabel
Hy
Habe einen Linux Server auf dem Samba und Cups läuft. Der hat 2 Netzwerkkarten, die eine soll ins Internet, die andeere ins LAN.
Nun hab ich folgendes IP Table Script angelegt.
#! /bin/bash
case "$1" in
start)
echo "Starting NAT/MASQ"
modprobe ip_tables && modprobe iptable_filter && modprobe ip_conntrack &&
modprobe ipt_MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -F && iptables -X && iptables -nat -F && iptables -t nat -X
iptables -A FORWARD -t filter -i eth0 -s 83.67.43.35 -j ACCEPT
iptables -A POSTROUTING -t nat -s 83.67.43.35 -j MASQUERADE
;;
stop)
echo "Stopping NAT/MASQ"
iptables -F && iptables -X && iptables -t nat -F && iptables -t nat -X
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
Leider tut das Ding gar nichts. Ich kann zwar vom LAN aus die eth0 anpingen, aber raus geht es nicht mehr.
Hat wer eine Idee ?
Habe einen Linux Server auf dem Samba und Cups läuft. Der hat 2 Netzwerkkarten, die eine soll ins Internet, die andeere ins LAN.
Nun hab ich folgendes IP Table Script angelegt.
#! /bin/bash
case "$1" in
start)
echo "Starting NAT/MASQ"
modprobe ip_tables && modprobe iptable_filter && modprobe ip_conntrack &&
modprobe ipt_MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -F && iptables -X && iptables -nat -F && iptables -t nat -X
iptables -A FORWARD -t filter -i eth0 -s 83.67.43.35 -j ACCEPT
iptables -A POSTROUTING -t nat -s 83.67.43.35 -j MASQUERADE
;;
stop)
echo "Stopping NAT/MASQ"
iptables -F && iptables -X && iptables -t nat -F && iptables -t nat -X
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
Leider tut das Ding gar nichts. Ich kann zwar vom LAN aus die eth0 anpingen, aber raus geht es nicht mehr.
Hat wer eine Idee ?