LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 02-09-2018, 04:43 AM   #1
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
libvirt: How to add firewall rule?


Hi,

Could you give me an example of how can I add firewall rule in libvirt?

That is, how to add rule like the following iptables one:
Code:
$IPT -A INPUT -i virbr0 -p tcp -m state --state NEW --dport ssh -j ACCEPT
Thanks in advance!

--
Best regards,
Andrzej Telszewski
 
Old 02-11-2018, 05:06 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,864

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
I simply does not understand that. What do you mean by
Quote:
add firewall rule in libvirt?
What do you want to achieve?
 
Old 02-11-2018, 12:46 PM   #3
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Original Poster
Rep: Reputation: Disabled
Hi,

I have a couple of services (NFS, Samba) that I want to be only available to virtual machines.
For the moment, I have iptables rules sitting in system global firewall script, that let the particular traffic pass through virbr* interfaces.

But because this rules directly relate to libvirt, in the sense that the services are meant for libvirt managed VMs,
I think it would be a cleaner solution to let libvirt manage those rules.
Something like it already does with DHCP and DNS.

--
Best regards,
Andrzej Telszewski
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to add flags in libvirt? ddenial Linux - Newbie 2 11-17-2017 07:43 AM
How to add a rule to firewall surya_prakash Linux - Newbie 3 04-07-2009 06:53 AM
some firewall rule sang_froid Linux - Security 3 02-10-2009 10:36 AM
Firewall-Rule Net_Spy Linux - Networking 4 11-20-2007 11:06 AM
Need A Firewall Rule linuxboy69 Linux - Software 1 11-26-2003 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 01:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration