Results 1 to 3 of 3
hello i need help with iptables, im trying to forward some ports to my windows machine and im still not able to make it work.
Code:
#!/bin/sh
IPTABLES=/sbin/iptables
#Enable forwarding
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-19-2004 #1Just Joined!
- Join Date
- Jul 2004
- Posts
- 8
NAT some ports to a windows machine
hello i need help with iptables, im trying to forward some ports to my windows machine and im still not able to make it work.
this is how my rc.firewall looks like now ... could you possable help me if you see somthing wrong in there or missing.Code:#!/bin/sh IPTABLES=/sbin/iptables #Enable forwarding iptables -F iptables -t nat -F iptables -X echo "1" > /proc/sys/net/ipv4/ip_forward $IPTABLES -P INPUT ACCEPT $IPTABLES -F INPUT $IPTABLES -P OUTPUT ACCEPT $IPTABLES -F OUTPUT $IPTABLES -P FORWARD DROP $IPTABLES -F FORWARD $IPTABLES -t nat -F $IPTABLES -A FORWARD -i ppp0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A FORWARD -i eth0 -o ppp0 -j ACCEPT $IPTABLES -A FORWARD -j LOG $IPTABLES -t nat -A POSTROUTING -o ppp0 -j MASQUERADE echo internet shering enabled iptables -t nat -A PREROUTING -p tcp --dport 6112 -j DNAT --to 192.168.0.2 iptables -t nat -A PREROUTING -p udp --dport 6112 -j DNAT --to 192.168.0.2 echo wc3 ports forwarded
Thx.
- 08-19-2004 #2
The switch for DNAT should be --to-destination.
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 08-26-2004 #3Just Joined!
- Join Date
- Jul 2004
- Posts
- 8
yeah i know but that dose not work eather


Reply With Quote
