using iptables dnat for redirection
Hello,
I have been trying to achieve something through iptables but something is going wrong. I want connection/packets arriving to a specific computer (let's call it "server") from another specific computer ("client") inside the same network to be automatically redirected to a remote computer in the internet and vice-versa. I tried doing that using iptables with these commands on the "server" PC: Code:
iptables -t nat -A PREROUTING --source 'client-ip' -j DNAT --to-destination 'remote-pc-ip' Any ideas and/or suggestion would be greatly appreciated. Thank you in advance! Nick |
Small update, I tried this:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward |
Code:
iptables -t nat -A PREROUTING --source 'client-ip' -j DNAT --to-destination 'remote-pc-ip' Code:
iptables -t filter -I FORWARD -s 'client-ip' -j ACCEPT Code:
echo 1 > /proc/sys/net/ipv4/ip_forward |
All times are GMT -5. The time now is 08:48 PM. |