How to forward traffic using iptables rules?
- by ProbablePattern
I am new to iptables and I have been doing Google searches for a few days now without finding a good solution to this problem.
I have computer A with a public ip address (say 192.0.2.1) that can access the Internet unrestricted. I have another computer B with a private ip address (192.168.1.1) that can only access computer A. How do I use iptables to forward network traffic from B through A to the Internet? I need to use http, ftp, and https in order to use apt-get with sudo.
Both computers run Ubuntu linux. I have tried using Squid but I think it is far too complicated for what I need to do.