I am practicing writing iptables rules and was looking to test the ones I wrote from an external network. I am currently running on an Ubuntu VM and have the following rules written:
sudo iptables -A INPUT -p tcp --dport 22 -s 10.10.1.0/24 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 22 -j DROP
The rules are meant to allow all SSH connections from devices on my local network and block external SSH connections. How would I go about testing that the 2nd rule works if I always access my VM from my local network?
How would I go about testing that the 2nd rule
- I am confused, why don't you go with the obvious answer, test it from something that isn't on your local network?