0

I have setup an Ubuntu server with multiple user for remote access. The public internet access is thru wifi. I need to block the public internet access for all user except two users, root and admin

Now I could had used the following command sudo iptables -A OUTPUT -m owner --uid-owner user_you_want_to_block -j REJEC This will block all the outgoing traffic for the user which I cannot do, I need allow all the user to use intranet which is thru the eth0

How should i do this

Nisheeth

1 Answers1

0

Could try to shut the card off with a logon script. Something like,

#!/bin/bash sudo iwconfig wlan0 down

This would leave the eth0 card up and running for your intranet use.

amanthethy
  • 1,251
  • This will shutdown the wlan0 for all users.I want to allow wifi for certain users and block for other users – user305312 Jul 14 '14 at 06:04
  • Add it to the INDIVIDUAL USER'S logon scripts. That way it'll only take effect if the user has this script set in their startup apps preferences. You could always do the opposite too (ie. shut the card off system wide and then reenable for root and admin with 'iwconfig wlan0 up' at login) http://askubuntu.com/questions/48321/how-do-i-start-applications-automatically-on-login – amanthethy Jul 14 '14 at 06:20