On Sun, 2007-12-09 at 09:52 +0000, Jonathan Underwood wrote: > On 09/12/2007, Craig White <craigwhite@xxxxxxxxxxx> wrote: > > Well, it's really an iptables question. > > > > alfresco runs on tomcat which runs as an unprivileged user which makes > > it difficult to use as a CIFS server (massive understatement) > > > > so what I want to do is to redirect packets from unprivileged ports to > > the normal SMB ports...here is my iptables script (but it's not working > > as intended) > > > > #!/bin/sh > > # > > echo 1 > /proc/sys/net/ipv4/ip_forward > > modprobe iptable_nat > > iptables -F > > iptables -t nat -F > > iptables -P INPUT ACCEPT > > iptables -P FORWARD ACCEPT > > iptables -P OUTPUT ACCEPT > > iptables -t nat -A PREROUTING -p tcp -d 192.168.3.8 --dport 445 -j > > REDIRECT \ > > --to-ports 1445 > > iptables -t nat -A PREROUTING -p tcp -d 192.168.3.8 --dport 139 -j > > REDIRECT \ > > --to-ports 1139 > > iptables -t nat -A PREROUTING -p udp -d 192.168.3.8 --dport 137 -j > > REDIRECT \ > > --to-ports 1137 > > iptables -t nat -A PREROUTING -p udp -d 192.168.3.8 --dport 138 -j > > REDIRECT \ > > --to-ports 1138 > > iptables -t nat -A PREROUTING -p tcp -s 192.168.3.8 --dport 1445 -j > > REDIRECT \ > > --to-ports 445 > > iptables -t nat -A PREROUTING -p tcp -s 192.168.3.8 --dport 1139 -j > > REDIRECT \ > > --to-ports 139 > > iptables -t nat -A PREROUTING -p udp -s 192.168.3.8 --dport 1137 -j > > REDIRECT \ > > --to-ports 137 > > iptables -t nat -A PREROUTING -p udp -s 192.168.3.8 --dport 1138 -j > > REDIRECT \ > > --to-ports 138 > > I might be wrong, but i think all of those -A should be -I. ---- Insert vs Append, not really since I don't even have a reject rule. Didn't make a difference (I actually tried it). Craig