Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > General Support > Topic : Rebuild Xen IPtables Without Restarting



Normal Mode | Print  

 Rebuild Xen IPtables Without Restarting, How does one Rebuild Xen IPtables Without Restarting (1 Replies, Read 2805 times)
bitronictechnologies
Group: Member
Post Group: Newbie
Posts: 3
Status:
I am having an issue. I "reset" the firewall to "factory defaults" in virtualizor. It deleted all of the forwarding rules in my IPtables. If I stop and start a VM it adds the rules back. Does anybody know how to rebuild the IPtables with rules for all of  the VMs without rebooting my 2 servers with many, many clients on them?

Perhaps a variant of this:

Code
#!/bin/bash

xm list | perl -alne 'next if not $F[1] > 0 ; print "@F[0,1]"' | while read VM ID
do
  xm network-list $ID | perl -alne 'next if not $F[0] =~ m{^\d+$} ; print $F[0]' | while read IFID
  do
    VIF="vif$ID.$IFID"
    echo iptables -A FORWARD -m physdev --physdev-in $VIF -s $VM -j ACCEPT
    echo iptables -A FORWARD -m physdev --physdev-in $VIF -p udp --sport bootpc --dport bootps -j ACCEPT
  done
done
IP: --   


Threads
 bitronictechnologies   Rebuild Xen IPtables Without Restarting, How does one Rebuild Xen IPtables Without Restarting (1 Replies, Read 2805 times)
    |--  bitronictechnologies   By the way...   on January 25, 2014, 7:43 am

« Previous    Next »

Normal Mode | Print  



Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is June 16, 2024, 12:36 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.031