I have a machine running linux and another one running windows (2003 server), at 1st it was the windows machine that was directly connected to the internet and it was doing the NAT, tho I decided to change this and I had to configure the linux to do NAT.
Almost everything seems to work fine tho with torrents for exemple I can't get remote connections. I do upload tho something is not working properly.
This was the rules I had made:
Code:
#modprobe ipt_MASQERADE;
#iptables -F; iptables -t nat -F; iptables -t mangle -F;
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
echo 1 > /proc/sys/net/ipv4/ip_forward;
#iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT;
#iptables -A INPUT -m state --state NEW -i ! eth0 -j ACCEPT;
#iptables -P INPUT DROP;
The lines with a # have been entered only once the others have to be entered once per reboot.
If any1 could help would be nice.
Soz about my english
[EDIT]
I found out that the 1st line aint working:
Code:
FATAL: Module ipt_MASQERADE not found.
another piece of info that might help:
Code:
# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Don't know if this is why tho imo the problem are the packages that are not being modified as they should...but tbh I have no ideia how to do it.
[/EDIT]