how to block my phone from the vps?

February 11, 2015 1.2k views

My android phone wlan mac is x1:x2:x3:x4:x5:X6
I want to block the phone to logon in the vps.
here is the iptable command:
iptables -A INPUT -m mac --mac-source x12345:X6 -j DROP

I found that it can't block my android phone to logon in the vps.
How to write the iptable rule?

  • How would you expect your VPS to see your phone's MAC address? That is, unless you go creative with a VPN, which I'd imagine would ruin the whole point.

  • Oh, and out of curiosity, what are you hoping to gain by blocking your phone on the network layer?

  • Sure you can! set your sshd_config to use only keys for logging in.

    no key on your phone, your phone will not be able to login..

    no need to mess with mac addresses. Here is a tutorial on how to configure ssh:


  • I guess he lost his phone with ssh/vpn access configured on it.
    Internet doesn't care about mac address, so what you need to do is to change passwords, or ssh keys if you use one.

Be the first one to answer this question.