I need a way to prevent remote desktop on my shared mac without changing the system preferences, i do however have the ability to install programs, despite my inability to mess with preferences. preferably i would like to be able to turn it on and off at will. i know this is a ridiculous request. but i thought id throw out there.

Dani AI

Generated

Short primer: — since you can install apps but can’t (or don’t want to) toggle Sharing, a practical, reversible approach is to make the remote‑management service unreachable on the network rather than altering Sharing prefs or deleting system files. Apple Remote Desktop / Screen Sharing uses VNC on TCP 5900 (extra displays use 5901/5902) and ARD uses TCP/UDP 3283 — blocking those ports prevents connections while leaving the service present. (support.apple.com)

A reliable cross‑version method is to use PF (the built‑in packet filter): either install a PF front end such as Murus to create a toggleable ruleset, or create a tiny PF anchor you load/unload with pfctl. Example anchor file (/etc/pf.anchors/blockard):

# /etc/pf.anchors/blockard
block in quick proto tcp from any to any port 5900
block in quick proto tcp from any to any port 3283

Test and toggle from the shell (example commands):

sudo pfctl -vnf /etc/pf.anchors/blockard                       # syntax check (no load)
sudo pfctl -a com.example/blockard -f /etc/pf.anchors/blockard -e  # load & enable
echo "" | sudo pfctl -a com.example/blockard -f -              # flush that anchor (disable)

Using an anchor lets you flip network reachability on/off without touching Sharing. If you prefer a GUI, Murus provides a menulet and prebuilt controls for PF. (apple.stackexchange.com)

Cautions: these operations require administrator privileges and can disrupt networking if a rule is wrong — always syntax‑check before enabling and keep a recovery method (SSH, alternate admin account, or bootable installer). PF is a kernel‑level facility; proceed carefully or use Murus if you’re unsure. (docs.oracle.com)

Security note: VNC/VNC‑style access can be insecure or unencrypted; when legitimate remote access is needed prefer an SSH tunnel or VPN and strong account passwords. If you don’t have admin rights to implement a PF rule, raise this with the Mac’s owner/administrator so a controlled solution can be applied. (support.apple.com)

Recommended Answers

All 3 Replies

Er i am not sure what you post is legal since turning off remote management is consider a hack. If i am allowed to help then, i will tell you what to do. hope you understand

er im not really trying to turn it off im just trying to avoid anyone hacking in that way as it happened to me last year and i simply want to prevent it without turning it off

Ok since you have stated i will help you with it. There are many ways

1) Is to disable remote management by turning it off
2) On your firewall and change the settings to block all incoming connections, this will block remote management from access to your laptop
3) You can go to and delete remote management system ( will cause you conputer to freeze often )
4) CAn change remote management settings. Go to system preference, select sharing. Scroll down and click on remote management then change the settings.

If you need more help just post, i will guide you more.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.