Okay I am totally new to IPTables and networking in Linux. I have a linux box hooked to my network and want to change the source and destination address of certain packets for VOIP purposes. All I have done so far is created a script for IPTables and activated it, but it doesnt seem to do anything. Here is my script as follows:


iptables -t filter --flush
iptables -t nat --flush
iptables -t mangle --flush

iptables -t filter --delete-chain
iptables -t nat --delete-chain
iptables -t mangle --delete-chain

iptables --policy INPUT DROP
iptables --policy OUTPUT DROP
iptables --policy FORWARD DROP
iptables -t nat --policy POSTROUTING ACCEPT
iptables -t nat --policy PREROUTING ACCEPT

iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

iptables -F PREROUTING
iptables -A POSTROUTING -p all -s 10.22.x.x -o eth0 -j SNAT --to 172.24.x.x
iptables -A PREROUTING -p all -d 172.24.x.x -i eth0 -j DNAT --to 10.22.x.x

service iptables status

Okay, How do I check to see if Network Filtering is turned on and do I need to use IP forwarding? Any help appreciated...


Justin Curtis