Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Ubuntu VPS server, openerp is running and anyone can using this web interface. my vps server is: http:// <Public IP>:8069/.

I want to allow some mac addresses and restrict to all. Here is my iptables file:

iptables -A INPUT -p tcp --match multiport --dports 80,8069 -m mac --mac-source E0:CA:94:A7:C2:80 -j ACCEPT

iptables -A INPUT -p tcp --match multiport --dports 80,8069 -m mac --mac-source 4C:72:B9:0D:D5:B7 -j ACCEPT

iptables -A INPUT -p tcp --match multiport --dports 80,8069 -j DROP

But it's not work. Would you please anyone help me.

What should I do ?

share|improve this question
Are the machines you wish to allow in the same LAN as the server you are shielding? – zwets Dec 16 '13 at 8:03
As it is public, so i want to restrict from public.only allow mac addresses can see this web it possible ? how can I do it? – Iftikhar Hossain Dec 16 '13 at 14:11
I got it.I cannot use mac address rules when sources are outside of your internal network. MY vps knows only router mac address and other stations mac adresses which are in the same network. I can add the rules based on IP address. – Iftikhar Hossain Dec 17 '13 at 14:49
Yes, that is the correct answer. I have added it as an answer to your question. – zwets Dec 18 '13 at 7:39
but how can I secure my web interface of this openerp?? – Iftikhar Hossain Dec 19 '13 at 8:32
up vote 1 down vote accepted

MAC based filtering only works for machines in the same LAN. To allow or deny access to machines in remote LANs, use IP-based filtering.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.