Created
December 20, 2019 07:33
-
-
Save csghone/b1e02fb893144a74dfdaaa67f59f9a6c to your computer and use it in GitHub Desktop.
Few IPTABLES commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Block internet access and limit SSH to single host to user 'vnc' | |
| # NOTE: This is not a perfect implementation, it can be worked around. | |
| sudo iptables -A OUTPUT -p tcp -m tcp --dport 80 -m owner --uid-owner vnc -j DROP | |
| sudo iptables -A OUTPUT -p tcp -m tcp --dport 443 -m owner --uid-owner vnc -j DROP | |
| sudo iptables -A OUTPUT ! -d 192.168.101.168/32 -p tcp -m tcp --dport 22 -m owner --uid-owner vnc -j REJECT --reject-with icmp-port-unreachable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment