If for example eth1 is for WAN and eth2 is for the internal network (as a gateway), what would be the code lines to only allow eth2 to access, through which my whole internal network has access, eth1 for internet use?
The idea being a form of port knock prevention so that only from the inside people can access the internet and from the outside world the computer is sort of none existence, "dead", when not in use.
And of course to counter Spoofing of various kinds.
Pretty much all my ports are closed, so that is not what I am referring to.
I read port knock information about how ports can be "knocked", close ports without daemons or programs listening behind it, and be opened.
This is sort of the question as well.
To explain it in the easiest way, simply make sure the ports can only be opened "one" way, from the inside.
Thank you.![]()

Mini Computer Vacuum USB Keyboard Cleaner PC Laptop Brush Dust Cleaning Kit NEW
$13.89
LEVOIT Cordless Vacuum Cleaner, Stick Vac with Tangle-Resistant Design, Up to...
$162.04
Cordless Air Duster & Vacuum Cleaner for Keyboard & PC Cleaning - 110000RPM Powe
$53.99
V3 Robot Vacuum and Mop Combo,Self-Charging,5000pa Strong Suction,WiFi/Alexa NIB
$82.00
US Mini Computer Vacuum USB Keyboard Cleaner PC Laptop Brush Dust Cleaning Kits
$13.89
Compressed Air Duster Rechargeable Computer Vacuum Cleaner for PC Keyboard Toys
$16.99
2-in-1 Compressed Air Duster & Vacuum, Brushless Motor, 320000RPM
$37.99
Mini Cordless Electric Keyboard Car Vacuum Cleaner Cleaning Duster Rechargeable
$9.97
Cordless Handheld Vacuum Cleaner Compatible with DeWalt 20V Battery
$107.67
Mini Computer Vacuum Cleaner & Compressed Air Duster 14500Pa, 110000RPM, Cordles
$53.99