Fwd: IPTABLES and SAMBA behind NAT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear experts,
we have a samba server (windows 2k3) behind the linux box (dapper) running NAT.
I am trying to configure iptables port forwarding from externalnetwork to internal samba server but without success.
My iptables script is:
#!/bin/bashecho 1 > /proc/sys/net/ipv4/ip_forward
IF_EXT="eth1"IF_INT1="eth0"
NT_EXT="EXTERNAL IP"NT_INT1="192.168.1.0/24"
PINKSTAR="192.168.1.3"
IPTABLES="/sbin/iptables"
# Clear all$IPTABLES -F$IPTABLES -X$IPTABLES -Z$IPTABLES -F -t nat$IPTABLES -X -t nat$IPTABLES -Z -t nat
$IPTABLES -A INPUT -i lo -j ACCEPT$IPTABLES -A OUTPUT -o lo -j ACCEPT
# Default policy: accept all$IPTABLES -P INPUT ACCEPT$IPTABLES -P OUTPUT ACCEPT$IPTABLES -A FORWARD -p tcp -m multiport --dport 554,1755 -j DROP$IPTABLES -P FORWARD ACCEPT
$IPTABLES -A FORWARD -i $IF_INT1 -j ACCEPT
# Masquarade$IPTABLES -t nat -A POSTROUTING -o $IF_EXT -j SNAT --to-source $NT_EXT
# SAMBA$IPTABLES -t nat -A PREROUTING -p udp -i $IF_EXT -d $NT_EXT -mmultiport --dport 137,138 -j DNAT --to $PINKSTAR$IPTABLES -t nat -A PREROUTING -p tcp -i $IF_EXT -d $NT_EXT -mmultiport --dport 139,445 -j DNAT --to $PINKSTAR
Thank you,
--по краям

--по краямЪТХ╨{.nг+┴╥÷╝┴╜├+%┼кЪ╠Ищ╤╔┼wЪ╨{.nг+┴╥╖zвБ√в╚Ч)М┘ФХw*jg╛╠╗╤┴ ▌┼щ╒jЪ╬╚ЧG╚²ИЪ╒╦╒╥╕j:+v┴╗┼wХjьm╤÷ЪЧЬ╞Ы╝w╔Ч┼ЮЧfё╒╥h ▐Б²ЗЪ├ы╔


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux