Jump to content

Blocking a user from accessing a specific port?


ianw1974
 Share

Recommended Posts

I'm running vmware-server under Linux, and the authentication works on port 902. What I want to do is stop a particular user from being able to connect to this port from external machines.

 

For example, if someone is using the vmware-server-console, I don't want them to use the root account to connect, and therefore deny access to this port from external IP addresses.

 

Anyone know how I could do this, or if it's possible or not?

Link to comment
Share on other sites

I think I might be able to do this with iptables. Here is the rule I've written, although yet to test it because people are connected with the account I want to block, and want them to finish before I deny access, and then tell them to use another account instead.

 

Any iptables experts out there that see a problem with my rule?

 

-A OUTPUT -p tcp -m tcp --sport 902 -d 172.20.0.0/16 -m uid-owner root -j DENY

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...