As I understand it, you want to make laptop #1 into a router. There are several packages that allow you to generate iptables
scripts which will establish this functionality. Some are GUI based, such as shorewall
and many others. Others are canned, configurable packages scripts that do the same thing. My personal preference in this category is HomeLANSecurity
, which I have used for many years with great success.
Since you are dealing with a laptop, there are probably implications for such a system, since I presume that you will run the laptop in other environments, where the router functionality would be inappropriate. I will leave it to others to comment on how you might deal with that. It probably wouldn't be difficult to simply run the iptables
firewall script, or not, depending on where you are running the laptop.
The functionality you require is done routinely using this kind of method.