Commit 469d2175 by x

Merge branch 'master' of ssh://giccero.cloud.ik.bme.hu/cloud

parents ef249bc8 822a14e0
from django.contrib import admin from django.contrib import admin
from firewall.models import * from firewall.models import *
from django import contrib
class AliasInline(contrib.admin.TabularInline):
model = Alias
class HostAdmin(admin.ModelAdmin): class HostAdmin(admin.ModelAdmin):
list_display = ('hostname', 'vlan', 'ipv4', 'ipv6', 'pub_ipv4', 'mac', 'shared_ip', 'owner', 'groups_l', 'rules_l', 'description', 'reverse') list_display = ('hostname', 'vlan', 'ipv4', 'ipv6', 'pub_ipv4', 'mac', 'shared_ip', 'owner', 'groups_l', 'rules_l', 'description', 'reverse')
ordering = ('hostname',) ordering = ('hostname', )
list_filter = ('owner', 'vlan', 'groups') list_filter = ('owner', 'vlan', 'groups')
search_fields = ('hostname', 'description', 'ipv4', 'ipv6', 'mac') search_fields = ('hostname', 'description', 'ipv4', 'ipv6', 'mac')
filter_horizontal = ('groups', 'rules',) filter_horizontal = ('groups', 'rules', )
inlines = (AliasInline, )
class HostInline(contrib.admin.TabularInline):
model = Host
fields = ('hostname', 'ipv4', 'ipv6', 'pub_ipv4', 'mac', 'shared_ip', 'owner', 'reverse')
class VlanAdmin(admin.ModelAdmin): class VlanAdmin(admin.ModelAdmin):
list_display = ('vid', 'name', 'rules_l', 'ipv4', 'net_ipv4', 'ipv6', 'net_ipv6', 'description', 'domain', 'snat_ip', 'snat_to_l') list_display = ('vid', 'name', 'rules_l', 'ipv4', 'net_ipv4', 'ipv6', 'net_ipv6', 'description', 'domain', 'snat_ip', 'snat_to_l')
ordering = ('vid',) ordering = ('vid', )
inlines = (HostInline, )
class RuleAdmin(admin.ModelAdmin): class RuleAdmin(admin.ModelAdmin):
list_display = ('r_type', 'color_desc', 'description', 'vlan_l', 'owner', 'extra', 'direction', 'accept', 'proto', 'sport', 'dport', 'nat', 'nat_dport') list_display = ('r_type', 'color_desc', 'description', 'vlan_l', 'owner', 'extra', 'direction', 'accept', 'proto', 'sport', 'dport', 'nat', 'nat_dport')
list_filter = ('r_type', 'vlan', 'owner', 'direction', 'accept', 'proto', 'nat') list_filter = ('r_type', 'vlan', 'owner', 'direction', 'accept', 'proto', 'nat')
class AliasAdmin(admin.ModelAdmin): class AliasAdmin(admin.ModelAdmin):
list_display = ('alias', 'host') list_display = ('alias', 'host')
class SettingAdmin(admin.ModelAdmin):
list_display = ('key', 'value')
admin.site.register(Host, HostAdmin) admin.site.register(Host, HostAdmin)
admin.site.register(Vlan, VlanAdmin) admin.site.register(Vlan, VlanAdmin)
admin.site.register(Rule, RuleAdmin) admin.site.register(Rule, RuleAdmin)
admin.site.register(Alias, AliasAdmin) admin.site.register(Alias, AliasAdmin)
admin.site.register(Setting, SettingAdmin)
admin.site.register(Group) admin.site.register(Group)
admin.site.register(Firewall) admin.site.register(Firewall)
from django.contrib import auth from django.contrib import auth
from firewall import models from firewall import models
from modeldict import *
import os import os
import subprocess import subprocess
import re import re
DNS_SERVER = "152.66.243.60" import json
class firewall: class firewall:
...@@ -291,6 +292,12 @@ def ipv6_to_octal(ipv6): ...@@ -291,6 +292,12 @@ def ipv6_to_octal(ipv6):
octets.append(int(part[2:], 16)) octets.append(int(part[2:], 16))
return '\\' + '\\'.join(['%03o' % x for x in octets]) return '\\' + '\\'.join(['%03o' % x for x in octets])
def ipv4_to_arpa(ipv4, cname=False):
m2 = re.search(r'^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$', ipv4)
if(cname):
return "%s.dns1.%s.%s.%s.in-addr.arpa" % (m2.group(4), m2.group(3), m2.group(2), m2.group(1))
else:
return "%s.%s.%s.%s.in-addr.arpa" % (m2.group(4), m2.group(3), m2.group(2), m2.group(1))
def ipv6_to_arpa(ipv6): def ipv6_to_arpa(ipv6):
while len(ipv6.split(':')) < 8: while len(ipv6.split(':')) < 8:
...@@ -310,52 +317,65 @@ def ipv6_to_arpa(ipv6): ...@@ -310,52 +317,65 @@ def ipv6_to_arpa(ipv6):
# =fqdn:ip:ttl A, PTR
# &fqdn:ip:x:ttl NS
# ZfqdnSOA
# +fqdn:ip:ttl A
# ^ PTR
# C CNAME
# : generic
def dns(): def dns():
vlans = models.Vlan.objects.all() vlans = models.Vlan.objects.all()
regex = re.compile(r'^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$') regex = re.compile(r'^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$')
DNS = [] DNS = []
DNS.append("=cloud.ik.bme.hu:152.66.243.98:600::\n") DNS.append("=cloud.ik.bme.hu:152.66.243.98:600::")
DNS.append(":cloud.ik.bme.hu:28:\040\001\007\070\040\001\100\061\000\002\000\000\000\007\000\000:600\n") DNS.append(":cloud.ik.bme.hu:28:\040\001\007\070\040\001\100\061\000\002\000\000\000\007\000\000:600")
# tarokkknak DNS.append("=r.cloud.ik.bme.hu:152.66.243.62:600::")
DNS.append("^%s.dns1.%s.%s.%s.in-addr.arpa:%s:600::\n" % (75, 243, 66, 152, "se.hpc.iit.bme.hu"))
DNS.append("^%s.dns1.%s.%s.%s.in-addr.arpa:%s:600::\n" % (76, 243, 66, 152, "ce.hpc.iit.bme.hu"))
DNS.append("^%s.dns1.%s.%s.%s.in-addr.arpa:%s:600::\n" % (77, 243, 66, 152, "mon.hpc.iit.bme.hu"))
DNS.append("^%s.dns1.%s.%s.%s.in-addr.arpa:%s:600::\n" % (62, 243, 66, 152, "r.cloud.ik.bme.hu"))
DNS.append("=r.cloud.ik.bme.hu:152.66.243.62:600::\n")
DNS.append("Z1.3.0.4.1.0.0.2.8.3.7.0.1.0.0.2.ip6.arpa:dns1.ik.bme.hu:support.ik.bme.hu::::::600\n") # soa DNS.append("Z1.3.0.4.1.0.0.2.8.3.7.0.1.0.0.2.ip6.arpa:dns1.ik.bme.hu:support.ik.bme.hu::::::600") # soa
DNS.append("&1.3.0.4.1.0.0.2.8.3.7.0.1.0.0.2.ip6.arpa::dns1.ik.bme.hu:600::\n") # ns rekord DNS.append("&1.3.0.4.1.0.0.2.8.3.7.0.1.0.0.2.ip6.arpa::dns1.ik.bme.hu:600::") # ns rekord
DNS.append("&1.3.0.4.1.0.0.2.8.3.7.0.1.0.0.2.ip6.arpa::nic.bme.hu:600::\n") # ns rekord DNS.append("&1.3.0.4.1.0.0.2.8.3.7.0.1.0.0.2.ip6.arpa::nic.bme.hu:600::") # ns rekord
# DNS.append("&1.3.0.4.1.0.0.2.8.3.7.0.1.0.0.2.ip6.arpa::ns.bme.hu:600::\n") # ns rekord
for i_vlan in vlans: for i_vlan in vlans:
m = regex.search(i_vlan.net4) m = regex.search(i_vlan.net4)
if(i_vlan.name != "DMZ" and i_vlan.name != "PUB"): if(i_vlan.name != "DMZ" and i_vlan.name != "PUB"):
DNS.append("Z%s.%s.in-addr.arpa:dns1.ik.bme.hu:support.ik.bme.hu::::::600\n" % (m.group(2), m.group(1))) DNS.append("Z%s.%s.in-addr.arpa:%s:support.ik.bme.hu::::::%s" % (m.group(2), m.group(1), models.settings['dns_hostname'], models.settings['dns_ttl']))
DNS.append("&%s.%s.in-addr.arpa::dns1.ik.bme.hu:600::\n" % (m.group(2), m.group(1))) DNS.append("&%s.%s.in-addr.arpa::%s:%s:" % (m.group(2), m.group(1), models.settings['dns_hostname'], models.settings['dns_ttl']))
DNS.append("Z%s:dns1.ik.bme.hu:support.ik.bme.hu::::::600\n" % i_vlan.domain) DNS.append("Z%s:%s:support.ik.bme.hu::::::%s" % (i_vlan.domain, models.settings['dns_hostname'], models.settings['dns_ttl']))
DNS.append("&%s::dns1.ik.bme.hu:600::\n" % i_vlan.domain) DNS.append("&%s::%s:%s" % (i_vlan.domain, models.settings['dns_hostname'], models.settings['dns_ttl']))
if(i_vlan.name == "WAR"): if(i_vlan.name == "WAR"):
DNS.append("Zdns1.%s.%s.%s.in-addr.arpa:dns1.ik.bme.hu:support.ik.bme.hu::::::600\n" % (m.group(3), m.group(2), m.group(1))) DNS.append("Zdns1.%s.%s.%s.in-addr.arpa:%s:support.ik.bme.hu::::::%s" % (m.group(3), m.group(2), m.group(1), models.settings['dns_hostname'], models.settings['dns_ttl']))
DNS.append("&dns1.%s.%s.%s.in-addr.arpa::dns1.ik.bme.hu:600::\n" % (m.group(3), m.group(2), m.group(1))) DNS.append("&dns1.%s.%s.%s.in-addr.arpa::%s:%s::" % (m.group(3), m.group(2), m.group(1), models.settings['dns_hostname'], models.settings['dns_ttl']))
for i_host in i_vlan.host_set.all(): for i_host in i_vlan.host_set.all():
ipv4 = ( i_host.pub_ipv4 if i_host.pub_ipv4 and not i_host.shared_ip else i_host.ipv4 ) ipv4 = ( i_host.pub_ipv4 if i_host.pub_ipv4 and not i_host.shared_ip else i_host.ipv4 )
m2 = regex.search(ipv4) reverse = i_host.reverse if(i_host.reverse and len(i_host.reverse)) else i_host.hostname + u'.' + i_vlan.domain
hostname = i_host.hostname + u'.' + i_vlan.domain
# ipv4 # ipv4
DNS.append("+%s:%s:600::\n" % (i_host.hostname + u'.' + i_vlan.domain, ipv4)) if i_host.ipv4:
DNS.append("^%s.%s.%s.%s.in-addr.arpa:%s:600::\n" % (m2.group(4), m2.group(3), m2.group(2), m2.group(1), i_host.reverse if(i_host.reverse and len(i_host.reverse)) else i_host.hostname + u'.' + i_vlan.domain)) # A record
DNS.append("^%s.dns1.%s.%s.%s.in-addr.arpa:%s:600::\n" % (m2.group(4), m2.group(3), m2.group(2), m2.group(1), i_host.reverse if(i_host.reverse and len(i_host.reverse)) else i_host.hostname + u'.' + i_vlan.domain)) DNS.append("+%s:%s:%s" % (hostname, ipv4, models.settings['dns_ttl']))
# PTR record 4.3.2.1.in-addr.arpa
DNS.append("^%s:%s:%s" % (ipv4_to_arpa(i_host.ipv4), reverse, models.settings['dns_ttl']))
# PTR record 4.dns1.3.2.1.in-addr.arpa
DNS.append("^%s:%s:%s" % (ipv4_to_arpa(i_host.ipv4, cname=True), reverse, models.settings['dns_ttl']))
# ipv6 # ipv6
if i_host.ipv6: if i_host.ipv6:
DNS.append(":%s:28:%s:600\n" % (i_host.hostname + u'.' + i_vlan.domain, ipv6_to_octal(i_host.ipv6))) # AAAA record
DNS.append("^%s:%s:600::\n" % (ipv6_to_arpa(i_host.ipv6), i_host.reverse if(i_host.reverse and len(i_host.reverse)) else i_host.hostname + u'.' + i_vlan.domain)) DNS.append(":%s:28:%s:%s" % (hostname, ipv6_to_octal(i_host.ipv6), models.settings['dns_ttl']))
# PTR record
DNS.append("^%s:%s:%s" % (ipv6_to_arpa(i_host.ipv6), reverse, models.settings['dns_ttl']))
# cname # cname
for i_alias in i_host.alias_set.all(): for i_alias in i_host.alias_set.all():
DNS.append("C%s:%s.%s:600\n" % (i_alias.alias, i_host.hostname, i_vlan.domain)) DNS.append("C%s:%s:%s" % (i_alias.alias, hostname, models.settings['dns_ttl']))
process = subprocess.Popen(['/usr/bin/ssh', 'tinydns@%s' % DNS_SERVER], shell=False, stdin=subprocess.PIPE) process = subprocess.Popen(['/usr/bin/ssh', 'tinydns@%s' % models.settings['dns_hostname']], shell=False, stdin=subprocess.PIPE)
process.communicate("\n".join(DNS)+"\n") process.communicate("\n".join(DNS)+"\n")
# print "\n".join(DNS)+"\n"
def prefix_to_mask(prefix): def prefix_to_mask(prefix):
...@@ -396,7 +416,7 @@ def dhcp(): ...@@ -396,7 +416,7 @@ def dhcp():
'domain': i_vlan.domain, 'domain': i_vlan.domain,
'router': i_vlan.ipv4, 'router': i_vlan.ipv4,
'ntp': i_vlan.ipv4, 'ntp': i_vlan.ipv4,
'dnsserver': DNS_SERVER, 'dnsserver': models.settings['rdns_ip'],
'extra': "range %s" % i_vlan.dhcp_pool if m else "deny unknown-clients", 'extra': "range %s" % i_vlan.dhcp_pool if m else "deny unknown-clients",
'interface': i_vlan.interface, 'interface': i_vlan.interface,
'name': i_vlan.name, 'name': i_vlan.name,
......
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Setting'
db.create_table('firewall_setting', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('key', self.gf('django.db.models.fields.CharField')(max_length=32)),
('value', self.gf('django.db.models.fields.CharField')(max_length=200)),
))
db.send_create_signal('firewall', ['Setting'])
def backwards(self, orm):
# Deleting model 'Setting'
db.delete_table('firewall_setting')
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'firewall.alias': {
'Meta': {'object_name': 'Alias'},
'alias': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Host']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
'firewall.firewall': {
'Meta': {'object_name': 'Firewall'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Rule']", 'null': 'True', 'blank': 'True'})
},
'firewall.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Rule']", 'null': 'True', 'blank': 'True'})
},
'firewall.host': {
'Meta': {'object_name': 'Host'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Group']", 'null': 'True', 'blank': 'True'}),
'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'ipv6': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'location': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'mac': ('firewall.fields.MACAddressField', [], {'unique': 'True', 'max_length': '17'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
'pub_ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True', 'blank': 'True'}),
'reverse': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Rule']", 'null': 'True', 'blank': 'True'}),
'shared_ip': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Vlan']"})
},
'firewall.rule': {
'Meta': {'object_name': 'Rule'},
'accept': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'direction': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
'dport': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'extra': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'nat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'nat_dport': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'proto': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
'r_type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'sport': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'vlan': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'})
},
'firewall.setting': {
'Meta': {'object_name': 'Setting'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
'firewall.vlan': {
'Meta': {'object_name': 'Vlan'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'dhcp_pool': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'domain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'interface': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'ipv6': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'net4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'net6': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'prefix4': ('django.db.models.fields.IntegerField', [], {'default': '16'}),
'prefix6': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'firewall_vlan_related'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['firewall.Rule']"}),
'snat_ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True', 'blank': 'True'}),
'snat_to': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'}),
'vid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'})
}
}
complete_apps = ['firewall']
\ No newline at end of file
...@@ -7,6 +7,13 @@ from django.utils.translation import ugettext_lazy as _ ...@@ -7,6 +7,13 @@ from django.utils.translation import ugettext_lazy as _
from firewall.fields import * from firewall.fields import *
from south.modelsinspector import add_introspection_rules from south.modelsinspector import add_introspection_rules
from django.core.validators import MinValueValidator, MaxValueValidator from django.core.validators import MinValueValidator, MaxValueValidator
from modeldict import ModelDict
class Setting(models.Model):
key = models.CharField(max_length=32)
value = models.CharField(max_length=200)
settings = ModelDict(Setting, key='key', value='value', instances=False)
class Rule(models.Model): class Rule(models.Model):
CHOICES_type = (('host', 'host'), ('firewall', 'firewall'), ('vlan', 'vlan')) CHOICES_type = (('host', 'host'), ('firewall', 'firewall'), ('vlan', 'vlan'))
......
...@@ -3,7 +3,7 @@ from django.core.cache import cache ...@@ -3,7 +3,7 @@ from django.core.cache import cache
import os import os
import time import time
from firewall.fw import * from firewall.fw import *
from firewall.models import settings
def reload_firewall_lock(): def reload_firewall_lock():
acquire_lock = lambda: cache.add("reload_lock1", "true", 9) acquire_lock = lambda: cache.add("reload_lock1", "true", 9)
...@@ -25,7 +25,11 @@ class ReloadTask(Task): ...@@ -25,7 +25,11 @@ class ReloadTask(Task):
return return
print "indul" print "indul"
time.sleep(10) try:
sleep = float(settings['reload_sleep'])
except:
sleep = 10
time.sleep(sleep)
try: try:
print "ipv4" print "ipv4"
......
#!/usr/bin/python
import base64
import xmltodict
import urllib2
import sys
xml = base64.b64decode(sys.argv[1])
data = xmltodict.parse(xml)
try:
booturl = data["VM"]["TEMPLATE"]["CONTEXT"]["BOOTURL"]
except:
print 'Error'
req=urllib2.Request(booturl)
response = urllib2.urlopen(req)
#!/bin/bash
if [ "$1" != -f ]
then
echo 'Clear ALL PRIVATE DATA ON THE VM. This is used for praparing VM template.'
echo -- '-f switch is required.'
exit 1
fi
rm -rf /opt/webadmin/cloud*
rm .bash_history
rm -f ~/.gitconfig
mysql <<A
DROP USER webadmin@localhost;
A
mysql <<A
DROP DATABASE webadmin;
A
sudo chpasswd <<<'cloud:ezmiez'
- fields:
accept: true
description: ''
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: 0
owner: 1
proto: null
r_type: host
sport: null
vlan: [4]
model: firewall.rule
pk: 1
- fields:
accept: true
description: ''
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: 0
owner: 1
proto: null
r_type: host
sport: null
vlan: [2]
model: firewall.rule
pk: 2
- fields:
accept: true
description: ''
direction: '1'
dport: null
extra: ''
nat: false
nat_dport: 0
owner: 1
proto: null
r_type: host
sport: null
vlan: [5]
model: firewall.rule
pk: 3
- fields:
accept: true
description: ssh ik net
direction: '1'
dport: 22
extra: -s 152.66.243.0/24
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 6
- fields:
accept: true
description: icmp
direction: '1'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: icmp
r_type: firewall
sport: null
vlan: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
model: firewall.rule
pk: 12
- fields:
accept: true
description: ''
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: firewall
sport: null
vlan: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
model: firewall.rule
pk: 15
- fields:
accept: true
description: dhcp, time, tftp
direction: '1'
dport: null
extra: -p udp -m multiport --dports 67,69,123
nat: false
nat_dport: null
owner: 1
proto: null
r_type: firewall
sport: null
vlan: [1, 2, 6, 8, 10, 12]
model: firewall.rule
pk: 26
- fields:
accept: true
description: iknet
direction: '0'
dport: null
extra: -d 152.66.243.0/24
nat: false
nat_dport: 0
owner: 1
proto: null
r_type: host
sport: null
vlan: [4]
model: firewall.rule
pk: 30
- fields:
accept: true
description: munin
direction: '1'
dport: 4949
extra: ''
nat: false
nat_dport: 0
owner: 1
proto: tcp
r_type: firewall
sport: null
vlan: [2]
model: firewall.rule
pk: 31
- fields:
accept: true
description: "nyomtat\xF3 egyteru"
direction: '0'
dport: null
extra: -d 10.0.0.253
nat: false
nat_dport: 0
owner: 1
proto: null
r_type: host
sport: null
vlan: [9]
model: firewall.rule
pk: 33
- fields:
accept: true
description: 'ssh '
direction: '1'
dport: 22
extra: ''
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 34
- fields:
accept: true
description: vpn
direction: '1'
dport: 3721
extra: ''
nat: false
nat_dport: null
owner: 1
proto: udp
r_type: firewall
sport: null
vlan: [4]
model: firewall.rule
pk: 35
- fields:
accept: true
description: iperf
direction: '1'
dport: 5001
extra: ''
nat: false
nat_dport: 0
owner: 1
proto: tcp
r_type: firewall
sport: null
vlan: [1, 2, 4, 6]
model: firewall.rule
pk: 36
- fields:
accept: true
description: dns
direction: '1'
dport: 53
extra: ''
nat: false
nat_dport: null
owner: 1
proto: udp
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 37
- fields:
accept: true
description: ssh
direction: '1'
dport: 532
extra: ''
nat: false
nat_dport: 0
owner: 1
proto: tcp
r_type: firewall
sport: null
vlan: [1, 2, 4, 6]
model: firewall.rule
pk: 38
- fields:
accept: true
description: (pub)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [4, 11]
model: firewall.rule
pk: 39
- fields:
accept: true
description: (dmz)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [6]
model: firewall.rule
pk: 40
- fields:
accept: true
description: (lab)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [4, 8]
model: firewall.rule
pk: 41
- fields:
accept: true
description: (man)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [2]
model: firewall.rule
pk: 42
- fields:
accept: true
description: (hot)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [3, 4, 6, 7]
model: firewall.rule
pk: 43
- fields:
accept: true
description: (vpn)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [3, 4, 5, 6, 7, 8, 10]
model: firewall.rule
pk: 44
- fields:
accept: true
description: (off)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [1, 3, 5, 6, 7, 8, 10]
model: firewall.rule
pk: 45
- fields:
accept: true
description: radius bd
direction: '1'
dport: 1812
extra: ''
nat: false
nat_dport: 0
owner: 1
proto: udp
r_type: host
sport: null
vlan: [3]
model: firewall.rule
pk: 46
- fields:
accept: true
description: http
direction: '1'
dport: 80
extra: ''
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 47
- fields:
accept: true
description: syslog iknet
direction: '1'
dport: 1999
extra: -s 152.66.243.0/24
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10]
model: firewall.rule
pk: 48
- fields:
accept: true
description: pbx
direction: '1'
dport: null
extra: -p tcp -m multiport --dport 80,2000,5060
nat: false
nat_dport: null
owner: 3
proto: null
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 261
- fields:
accept: true
description: pbx
direction: '1'
dport: null
extra: -p udp -m multiport --dport 5000,5060,4569
nat: false
nat_dport: null
owner: 3
proto: null
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 262
- fields:
accept: true
description: "nyomtat\xF3 canon iR2870 (f\xE9nym\xE1sol\xF3)"
direction: '0'
dport: null
extra: -d 10.0.0.251
nat: false
nat_dport: null
owner: 1
proto: null
r_type: host
sport: null
vlan: [9]
model: firewall.rule
pk: 263
- fields:
accept: true
description: nyomtato hp laserjet cp1525
direction: '0'
dport: null
extra: -d 10.0.0.65
nat: false
nat_dport: 0
owner: 1
proto: null
r_type: host
sport: null
vlan: [9]
model: firewall.rule
pk: 264
- fields:
accept: true
description: identd
direction: '1'
dport: 113
extra: ''
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [4]
model: firewall.rule
pk: 265
- fields:
accept: true
description: id-81_user-bd tcp 23107->3389
direction: '1'
dport: 33107
extra: ''
nat: true
nat_dport: 3389
owner: 2
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 734
- fields:
accept: true
description: ''
direction: '1'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: host
sport: null
vlan: [4]
model: firewall.rule
pk: 750
- fields:
accept: true
description: ''
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 4
proto: null
r_type: host
sport: null
vlan: [8]
model: firewall.rule
pk: 751
- fields:
accept: true
description: id-412-Gabor_BackUp tcp 22005->22
direction: '1'
dport: 32005
extra: ''
nat: true
nat_dport: 22
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 773
- fields:
accept: true
description: id-412-Gabor_BackUp tcp 23005->3389
direction: '1'
dport: 33005
extra: ''
nat: true
nat_dport: 3389
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 774
- fields:
accept: true
description: id-90_user-bd tcp 23019->3389
direction: '1'
dport: 33019
extra: ''
nat: true
nat_dport: 3389
owner: 2
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 825
- fields:
accept: true
description: dns
direction: '1'
dport: 53
extra: ''
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 849
- fields:
accept: true
description: (war)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [7]
model: firewall.rule
pk: 850
- fields:
accept: true
description: (vm-net)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [10]
model: firewall.rule
pk: 851
- fields:
accept: true
description: https
direction: '1'
dport: 443
extra: ''
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 856
- fields:
accept: true
description: opennebula novnc
direction: '1'
dport: 29876
extra: ''
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [2, 3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 859
- fields:
accept: true
description: smb server
direction: '0'
dport: null
extra: -d 10.0.0.253
nat: false
nat_dport: null
owner: 3
proto: null
r_type: host
sport: null
vlan: [9]
model: firewall.rule
pk: 866
- fields:
accept: true
description: time war
direction: '1'
dport: 123
extra: ''
nat: false
nat_dport: null
owner: 3
proto: udp
r_type: firewall
sport: null
vlan: [7]
model: firewall.rule
pk: 867
- fields:
accept: true
description: ''
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: host
sport: null
vlan: [7]
model: firewall.rule
pk: 870
- fields:
accept: true
description: ''
direction: '0'
dport: 25
extra: ''
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [4]
model: firewall.rule
pk: 948
- fields:
accept: true
description: (war2)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [4, 11]
model: firewall.rule
pk: 949
- fields:
accept: true
description: (off2)
direction: '0'
dport: null
extra: ''
nat: false
nat_dport: null
owner: 1
proto: null
r_type: vlan
sport: null
vlan: [12]
model: firewall.rule
pk: 950
- fields:
accept: true
description: id-140_user-root tcp 22001 -> 22
direction: '1'
dport: 32001
extra: ''
nat: true
nat_dport: 22
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 964
- fields:
accept: true
description: id-689-DP tcp 22066 -> 22
direction: '1'
dport: 32066
extra: ''
nat: true
nat_dport: 22
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 967
- fields:
accept: true
description: id-689-DP tcp 23066 -> 3389
direction: '1'
dport: 33066
extra: ''
nat: true
nat_dport: 3389
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 968
- fields:
accept: true
description: id-690-DP tcp 22071 -> 22
direction: '1'
dport: 32071
extra: ''
nat: true
nat_dport: 22
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 969
- fields:
accept: true
description: id-690-DP tcp 23071 -> 3389
direction: '1'
dport: 33071
extra: ''
nat: true
nat_dport: 3389
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 970
- fields:
accept: true
description: id-694-UI tcp 22073 -> 22
direction: '1'
dport: 32073
extra: ''
nat: true
nat_dport: 22
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 971
- fields:
accept: true
description: id-694-UI tcp 23073 -> 3389
direction: '1'
dport: 33073
extra: ''
nat: true
nat_dport: 3389
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 972
- fields:
accept: true
description: id-696-VERS tcp 22074 -> 22
direction: '1'
dport: 32074
extra: ''
nat: true
nat_dport: 22
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 973
- fields:
accept: true
description: id-696-VERS tcp 23074 -> 3389
direction: '1'
dport: 33074
extra: ''
nat: true
nat_dport: 3389
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 974
- fields:
accept: true
description: id-145_user-test tcp 23006 -> 3389
direction: '1'
dport: 33006
extra: ''
nat: true
nat_dport: 3389
owner: 7
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 978
- fields:
accept: true
description: ''
direction: '1'
dport: 33009
extra: ''
nat: true
nat_dport: 3389
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 980
- fields:
accept: true
description: id-708-Hanak-Windows7 tcp 22009 -> 22
direction: '1'
dport: 32009
extra: ''
nat: true
nat_dport: 22
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 984
- fields:
accept: true
description: id-708-Hanak-Windows7 tcp 23009 -> 3389
direction: '1'
dport: 33009
extra: ''
nat: true
nat_dport: 3389
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 985
- fields:
accept: true
description: levelezhet cronosra
direction: '0'
dport: 25
extra: -d 152.66.243.1
nat: false
nat_dport: null
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [4]
model: firewall.rule
pk: 988
- fields:
accept: true
description: id-156_user-lennon tcp 23013 -> 3389
direction: '1'
dport: 33013
extra: ''
nat: true
nat_dport: 3389
owner: 6
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 994
- fields:
accept: true
description: id-158_user-K7YLW5 tcp 22015 -> 22
direction: '1'
dport: 32015
extra: ''
nat: true
nat_dport: 22
owner: 14
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 996
- fields:
accept: true
description: "id-161_user-root tcp 22017\u2009\u25B8\u200922"
direction: '1'
dport: 32017
extra: ''
nat: true
nat_dport: 22
owner: 1
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 999
- fields:
accept: true
description: "id-165_user-K2JL24 tcp 22021\u2009\u25B8\u200922"
direction: '1'
dport: 32021
extra: ''
nat: true
nat_dport: 22
owner: 11
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 1003
- fields:
accept: true
description: "id-740-one-740 tcp 22030\u2009\u25B8\u200922"
direction: '1'
dport: 32030
extra: ''
nat: true
nat_dport: 22
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 1021
- fields:
accept: true
description: "id-740-one-740 tcp 23030\u2009\u25B8\u20093389"
direction: '1'
dport: 33030
extra: ''
nat: true
nat_dport: 3389
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 1022
- fields:
accept: true
description: "id-748-Dev tcp 22036\u2009\u25B8\u200922"
direction: '1'
dport: 32036
extra: ''
nat: true
nat_dport: 22
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 1027
- fields:
accept: true
description: "id-748-Dev tcp 23036\u2009\u25B8\u20093389"
direction: '1'
dport: 33036
extra: ''
nat: true
nat_dport: 3389
owner: 5
proto: tcp
r_type: host
sport: null
vlan: [3, 4, 6, 7, 8, 10, 12]
model: firewall.rule
pk: 1028
- fields:
comment: ''
description: ''
dhcp_pool: manual
domain: off.ik.bme.hu
interface: vlan0005
ipv4: 10.5.255.254
ipv6: 2001:738:2001:4031:5:255:254:0
name: 'OFF'
net4: 10.5.0.0
net6: '2001:738:2001:4031:5::'
prefix4: 16
prefix6: 80
rules: [45]
snat_ip: 152.66.243.160
snat_to: [4, 7]
vid: 5
model: firewall.vlan
pk: 1
- fields:
comment: ''
description: ''
dhcp_pool: 10.3.3.2 10.3.3.254
domain: man.ik.bme.hu
interface: vlan0003
ipv4: 10.3.255.254
ipv6: 2001:738:2001:4031:3:255:254:0
name: MAN
net4: 10.3.0.0
net6: '2001:738:2001:4031:3::'
prefix4: 16
prefix6: 80
rules: [42]
snat_ip: 152.66.243.160
snat_to: [4, 7]
vid: 3
model: firewall.vlan
pk: 2
- fields:
comment: ''
description: ''
dhcp_pool: 10.4.0.2 10.4.0.254
domain: hot.ik.bme.hu
interface: vlan0004
ipv4: 10.4.255.254
ipv6: 2001:738:2001:4031:4:255:254:0
name: HOT
net4: 10.4.0.0
net6: '2001:738:2001:4031:4::'
prefix4: 16
prefix6: 80
rules: [43]
snat_ip: 152.66.243.160
snat_to: [4, 7]
vid: 4
model: firewall.vlan
pk: 3
- fields:
comment: ''
description: ''
dhcp_pool: ''
domain: ''
interface: pub
ipv4: 152.66.243.160
ipv6: 2001:738:2001:4030::fffe
name: PUB
net4: 152.66.243.0
net6: '2001:738:2001:4030::'
prefix4: 24
prefix6: 64
rules: [39]
snat_ip: null
snat_to: []
vid: 66
model: firewall.vlan
pk: 4
- fields:
comment: ''
description: ''
dhcp_pool: ''
domain: vpn.ik.bme.hu
interface: vpn
ipv4: 10.1.255.254
ipv6: 2001:738:2001:4031:1:255:254:0
name: VPN
net4: 10.1.0.0
net6: '2001:738:2001:4031:1::'
prefix4: 16
prefix6: 80
rules: [44]
snat_ip: 152.66.243.160
snat_to: [4, 5, 7]
vid: 1
model: firewall.vlan
pk: 5
- fields:
comment: ''
description: ''
dhcp_pool: manual
domain: cloud.ik.bme.hu
interface: vlan0002
ipv4: 10.2.255.254
ipv6: 2001:738:2001:4031:2:255:254:0
name: DMZ
net4: 10.2.0.0
net6: '2001:738:2001:4031:2::'
prefix4: 16
prefix6: 80
rules: [40]
snat_ip: null
snat_to: []
vid: 2
model: firewall.vlan
pk: 6
- fields:
comment: ''
description: ''
dhcp_pool: manual
domain: cloud.ik.bme.hu
interface: vlan0006
ipv4: 152.66.243.126
ipv6: 2001:738:2001:4031:66:243:126:0
name: WAR
net4: 152.66.243.64
net6: '2001:738:2001:4031:66::'
prefix4: 26
prefix6: 80
rules: [850]
snat_ip: null
snat_to: []
vid: 6
model: firewall.vlan
pk: 7
- fields:
comment: ''
description: ''
dhcp_pool: 10.7.0.2 10.7.0.254
domain: lab.ik.bme.hu
interface: vlan0007
ipv4: 10.7.255.254
ipv6: 2001:738:2001:4031:7:255:254:0
name: LAB
net4: 10.7.0.0
net6: '2001:738:2001:4031:7::'
prefix4: 16
prefix6: 80
rules: [41]
snat_ip: 152.66.243.160
snat_to: [4, 7]
vid: 7
model: firewall.vlan
pk: 8
- fields:
comment: ''
description: "Ketler office h\xE1l\xF3zata a nyomtat\xF3 miatt (a M\xE1t\xE9 erre\
\ azt k\xE9rdezte, hogy a nyomtat\xF3 miatt az \xF6v\xE9?)"
dhcp_pool: ''
domain: ''
interface: vlan0008
ipv4: 10.0.0.247
ipv6: 2001:738:2001:4031:8:0:247:0
name: WOLF
net4: 10.0.0.0
net6: '2001:738:2001:4031:8::'
prefix4: 24
prefix6: 80
rules: []
snat_ip: null
snat_to: []
vid: 8
model: firewall.vlan
pk: 9
- fields:
comment: ''
description: ''
dhcp_pool: manual
domain: vm-net.ik.bme.hu
interface: vlan0009
ipv4: 10.9.255.254
ipv6: 2001:738:2001:4031:9:255:254:0
name: VM-NET
net4: 10.9.0.0
net6: '2001:738:2001:4031:9::'
prefix4: 16
prefix6: 80
rules: [851]
snat_ip: 152.66.243.62
snat_to: [4, 7, 10]
vid: 9
model: firewall.vlan
pk: 10
- fields:
comment: ''
description: mozdonyok
dhcp_pool: ''
domain: ''
interface: vlan0010
ipv4: 152.66.243.166
ipv6: 2001:738:2001:4031:10:255:254:0
name: WAR2
net4: 152.66.243.160
net6: '2001:738:2001:4031:10::'
prefix4: 27
prefix6: 80
rules: [949]
snat_ip: null
snat_to: []
vid: 10
model: firewall.vlan
pk: 11
- fields:
comment: ''
description: ''
dhcp_pool: ''
domain: ''
interface: vlan0011
ipv4: 10.11.255.254
ipv6: 2001:738:2001:4031:11:255:254:0
name: OFF2
net4: 10.11.0.0
net6: '2001:738:2001:4031:11::'
prefix4: 16
prefix6: 80
rules: [950]
snat_ip: 152.66.243.160
snat_to: [4, 7]
vid: 11
model: firewall.vlan
pk: 12
- fields:
name: irodai gep
rules: [1, 33, 263, 264]
model: firewall.group
pk: 1
- fields:
name: irodai telefon
rules: [30]
model: firewall.group
pk: 3
- fields:
name: mailezhet cronosra
rules: [988]
model: firewall.group
pk: 7
- fields:
name: mailszerver
rules: [948]
model: firewall.group
pk: 6
- fields:
name: minden pub fele
rules: [1, 750]
model: firewall.group
pk: 5
- fields:
name: netezhet
rules: [1, 870]
model: firewall.group
pk: 4
- fields:
name: vpnrol elerheto
rules: [3]
model: firewall.group
pk: 2
- fields:
comment: ''
description: bd gepe
groups: [1, 2]
hostname: bd
ipv4: 10.5.253.6
ipv6: 2001:738:2001:4031:5:253:6:0
location: ''
mac: 00:13:f7:d1:b8:af
owner: 2
pub_ipv4: null
rules: [2]
shared_ip: false
vlan: 1
model: firewall.host
pk: 7
- fields:
comment: "saj\xE1t g\xE9p"
description: "\u0150ry M\xE1t\xE9 laptopja"
groups: [1, 2]
hostname: mate
ipv4: 10.5.253.5
ipv6: 2001:738:2001:4031:5:253:5:0
location: ''
mac: 64:31:50:93:4e:5d
owner: 3
pub_ipv4: null
rules: [2]
shared_ip: false
vlan: 1
model: firewall.host
pk: 8
- fields:
comment: ''
description: Cziva Ricsi telefonja
groups: [3]
hostname: tele8
ipv4: 10.5.253.87
ipv6: 2001:738:2001:4031:5:253:87:0
location: ''
mac: 00:90:78:83:56:76
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 9
- fields:
comment: ''
description: "M\xE1t\xE9 \xE9s bd telefonja"
groups: [3]
hostname: tele6
ipv4: 10.5.253.85
ipv6: 2001:738:2001:4031:5:253:85:0
location: ''
mac: 00:18:f8:84:f9:64
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 10
- fields:
comment: ''
description: az uj fejgep
groups: [2, 4, 6]
hostname: cloud
ipv4: 10.2.0.7
ipv6: 2001:738:2001:4031:2:0:7:0
location: ''
mac: b4:b5:2f:67:ef:76
owner: 4
pub_ipv4: 152.66.243.98
rules: [2, 3, 34, 47, 751, 856, 859]
shared_ip: false
vlan: 6
model: firewall.host
pk: 12
- fields:
comment: ''
description: ''
groups: []
hostname: BLADE-VCETW280200SN
ipv4: 10.3.2.2
ipv6: 2001:738:2001:4031:3:2:2:0
location: ''
mac: 00:1b:78:6e:81:42
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 17
- fields:
comment: ''
description: ''
groups: []
hostname: BLADE-ILOGB8849B4JH
ipv4: 10.3.2.3
ipv6: 2001:738:2001:4031:3:2:3:0
location: ''
mac: 00:22:64:9c:24:96
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 18
- fields:
comment: ''
description: ''
groups: []
hostname: BLADE-VCETW280200SK
ipv4: 10.3.2.4
ipv6: 2001:738:2001:4031:3:2:4:0
location: ''
mac: 00:1b:78:6e:81:3c
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 19
- fields:
comment: ''
description: ''
groups: []
hostname: BLADE-ILOPZ81MP6122
ipv4: 10.3.2.5
ipv6: 2001:738:2001:4031:3:2:5:0
location: ''
mac: 00:1e:0b:ec:13:58
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 20
- fields:
comment: ''
description: ''
groups: []
hostname: BLADE-ILOCZJ80408UH
ipv4: 10.3.2.6
ipv6: 2001:738:2001:4031:3:2:6:0
location: ''
mac: 00:1e:0b:e9:66:78
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 21
- fields:
comment: ''
description: ''
groups: [4]
hostname: mega6
ipv4: 10.3.1.16
ipv6: 2001:738:2001:4031:3:1:16:0
location: ''
mac: 18:a9:05:64:19:aa
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 22
- fields:
comment: ''
description: ''
groups: [4]
hostname: blade1
ipv4: 10.3.1.21
ipv6: 2001:738:2001:4031:3:1:21:0
location: ''
mac: 00:1e:0b:e9:79:1e
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 23
- fields:
comment: ''
description: ''
groups: [4]
hostname: blade2
ipv4: 10.3.1.22
ipv6: 2001:738:2001:4031:3:1:22:0
location: ''
mac: 00:22:64:9c:fd:34
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 24
- fields:
comment: ''
description: ''
groups: [4]
hostname: blade3
ipv4: 10.3.1.23
ipv6: 2001:738:2001:4031:3:1:23:0
location: ''
mac: 00:1e:0b:ec:65:46
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 25
- fields:
comment: ''
description: tarokkkk laptopja
groups: [1]
hostname: tarokkk-off
ipv4: 10.5.253.3
ipv6: 2001:738:2001:4031:5:253:3:0
location: ''
mac: e4:11:5b:41:64:d9
owner: 4
pub_ipv4: null
rules: [2]
shared_ip: false
vlan: 1
model: firewall.host
pk: 27
- fields:
comment: ''
description: tarokkk iptelefonja
groups: [3]
hostname: tele4
ipv4: 10.5.253.83
ipv6: 2001:738:2001:4031:5:253:83:0
location: ''
mac: 00:01:a8:02:2d:2f
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 28
- fields:
comment: ''
description: ''
groups: [2, 4]
hostname: mega5
ipv4: 10.3.1.15
ipv6: 2001:738:2001:4031:3:1:15:0
location: ''
mac: 18:a9:05:61:fc:be
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 30
- fields:
comment: ''
description: ''
groups: [2]
hostname: mega5-ilo
ipv4: 10.3.2.15
ipv6: 2001:738:2001:4031:3:2:15:0
location: ''
mac: 18:a9:05:61:fc:c6
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 35
- fields:
comment: ''
description: ''
groups: []
hostname: mega6-ilo
ipv4: 10.3.2.16
ipv6: 2001:738:2001:4031:3:2:16:0
location: ''
mac: 18:a9:05:64:19:b2
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 36
- fields:
comment: ''
description: adjatok akkountot tipusu gep
groups: [1]
hostname: laborteszt
ipv4: 10.5.253.10
ipv6: 2001:738:2001:4031:5:253:10:0
location: ''
mac: c8:60:00:ca:bb:47
owner: 4
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 105
- fields:
comment: ''
description: "Ny\xEDri G\xE1bor iptelefonja"
groups: [3]
hostname: tele3
ipv4: 10.5.253.82
ipv6: 2001:738:2001:4031:5:253:82:0
location: ''
mac: 00:90:78:83:56:72
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 300
- fields:
comment: ''
description: "konyha \xE9s IL306 iptelefon"
groups: [3]
hostname: tele7
ipv4: 10.5.253.86
ipv6: 2001:738:2001:4031:5:253:86:0
location: IL312
mac: 00:90:78:83:56:75
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 303
- fields:
comment: ''
description: "K\xE1polnai Rich\xE1rd iptelefonja"
groups: [3]
hostname: tele2
ipv4: 10.5.253.81
ipv6: 2001:738:2001:4031:5:253:81:0
location: "az asztal\xE1n XDDDD"
mac: 00:01:a8:02:2d:40
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 304
- fields:
comment: ''
description: L212 iptelefon
groups: [3]
hostname: tele5
ipv4: 10.5.253.84
ipv6: 2001:738:2001:4031:5:253:84:0
location: ''
mac: 00:01:a8:02:2d:47
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 305
- fields:
comment: "K\xE1polnai Rich\xE1rd adminolja"
description: "Deklarat\xEDv Programoz\xE1s hallgat\xF3i shellszerver"
groups: [5]
hostname: dps
ipv4: 152.66.243.72
ipv6: 2001:738:2001:4031:66:243:72:0
location: cloud-os gep
mac: 02:00:98:42:f3:48
owner: 5
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 494
- fields:
comment: "\xC9rintettek: Ny\xEDri G\xE1bor (root), Schnell Henrik, Szebi stb.\r\
\n"
description: "web2grid projektg\xE9p (\xE9s egyebek)\r\n"
groups: [5]
hostname: bvp6
ipv4: 152.66.243.80
ipv6: 2001:738:2001:4031:66:243:80:0
location: cloud-os gep
mac: 02:00:98:42:f3:50
owner: 5
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 497
- fields:
comment: ''
description: cloud-os gep
groups: [4]
hostname: Gabor_BackUp
ipv4: 10.9.1.5
ipv6: 2001:738:2001:4031:9:1:5:0
location: ''
mac: 02:00:0a:09:01:05
owner: 5
pub_ipv4: 152.66.243.62
rules: [773, 774]
shared_ip: true
vlan: 10
model: firewall.host
pk: 501
- fields:
comment: ''
description: ''
groups: [2, 4]
hostname: mega4
ipv4: 10.3.1.14
ipv6: 2001:738:2001:4031:3:1:14:0
location: ''
mac: b4:99:ba:aa:20:44
owner: 2
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 510
- fields:
comment: ''
description: ''
groups: []
hostname: mega4-ilo
ipv4: 10.3.2.14
ipv6: 2001:738:2001:4031:3:2:14:0
location: ''
mac: b4:99:ba:aa:20:46
owner: 2
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 511
- fields:
comment: ''
description: ''
groups: [2, 4]
hostname: mega3
ipv4: 10.3.1.13
ipv6: 2001:738:2001:4031:3:1:13:0
location: ''
mac: b4:99:ba:aa:1b:d6
owner: 2
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 513
- fields:
comment: ''
description: ''
groups: []
hostname: mega3-ilo
ipv4: 10.3.2.13
ipv6: 2001:738:2001:4031:3:2:13:0
location: ''
mac: b4:99:ba:aa:1b:d5
owner: 2
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 514
- fields:
comment: ''
description: ''
groups: [4]
hostname: id-90_user-bd
ipv4: 10.9.1.19
ipv6: 2001:738:2001:4031:9:1:19:0
location: ''
mac: 02:00:0a:09:01:13
owner: 2
pub_ipv4: 152.66.243.62
rules: [825]
shared_ip: true
vlan: 10
model: firewall.host
pk: 524
- fields:
comment: "BD szem\xE9lyes akkountoszt\xF3s g\xE9pe"
description: cloud-os gep
groups: [5]
hostname: kagylo
ipv4: 152.66.243.65
ipv6: 2001:738:2001:4031:66:243:65:0
location: ''
mac: 02:00:98:42:f3:41
owner: 5
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 532
- fields:
comment: ''
description: ''
groups: [2]
hostname: mega1-ilo
ipv4: 10.3.2.11
ipv6: 2001:738:2001:4031:3:2:11:0
location: ''
mac: 18:a9:05:c5:67:ca
owner: 2
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 535
- fields:
comment: ''
description: ''
groups: [2, 4]
hostname: mega1
ipv4: 10.3.1.11
ipv6: 2001:738:2001:4031:3:1:11:0
location: ''
mac: 18:a9:05:c5:67:c8
owner: 2
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 536
- fields:
comment: "Admin: Szeber\xE9nyi Imre"
description: "GridOO labor hallgat\xF3i szerver"
groups: [5]
hostname: ParaHead
ipv4: 152.66.243.90
ipv6: 2001:738:2001:4031:66:243:90:0
location: cloud
mac: 02:00:98:42:f3:5a
owner: 4
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 541
- fields:
comment: ''
description: ''
groups: [2]
hostname: mega2-ilo
ipv4: 10.3.2.12
ipv6: 2001:738:2001:4031:3:2:12:0
location: ''
mac: d8:d3:85:ae:f9:7a
owner: 2
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 544
- fields:
comment: ''
description: ''
groups: [2, 4]
hostname: mega2
ipv4: 10.3.1.12
ipv6: 2001:738:2001:4031:3:1:12:0
location: ''
mac: d8:d3:85:ae:f9:78
owner: 2
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 545
- fields:
comment: ''
description: cloud-os gep
groups: [5]
hostname: store
ipv4: 152.66.243.70
ipv6: 2001:738:2001:4031:66:243:70:0
location: ''
mac: 02:00:98:42:f3:46
owner: 5
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 546
- fields:
comment: ''
description: "Ny\xEDri G\xE1bor laptopja"
groups: [1, 2, 4]
hostname: gabor
ipv4: 10.5.253.7
ipv6: 2001:738:2001:4031:5:253:7:0
location: ''
mac: 00:1C:C4:C9:6C:DD
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 547
- fields:
comment: ''
description: Tarokkk anonim alkoholista szervere.
groups: [5]
hostname: tarokkk
ipv4: 152.66.243.78
ipv6: 2001:738:2001:4031:66:243:78:0
location: ''
mac: 02:00:98:42:f3:4e
owner: 5
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 550
- fields:
comment: ''
description: harmadik emeleti rendezoben levo linksys switch (regi denes fele
halozat resze volt)
groups: [2]
hostname: switch2
ipv4: 10.3.0.3
ipv6: 2001:738:2001:4031:3:254:2:0
location: ''
mac: 00:1e:e5:09:70:19
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 2
model: firewall.host
pk: 554
- fields:
comment: ''
description: "Dud\xE1s \xC1d\xE1m laptop"
groups: [1, 2]
hostname: dudi
ipv4: 10.5.253.8
ipv6: 2001:738:2001:4031:5:253:8:0
location: ''
mac: 00:1d:72:3b:64:b7
owner: 1
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 555
- fields:
comment: ''
description: "Prog2 t\xE1rgyhonlap drupal"
groups: [5]
hostname: infocpp
ipv4: 152.66.243.67
ipv6: 2001:738:2001:4031:66:243:67:0
location: cloud
mac: 02:00:98:42:f3:43
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 596
- fields:
comment: ''
description: cloud-os gep
groups: [5, 6]
hostname: zimbra
ipv4: 152.66.243.68
ipv6: 2001:738:2001:4031:66:243:68:0
location: ''
mac: 02:00:98:42:f3:44
owner: 5
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 612
- fields:
comment: ''
description: TeamConcert Windows 2008 server
groups: [5]
hostname: teamconcert
ipv4: 152.66.243.69
ipv6: 2001:738:2001:4031:66:243:69:0
location: ''
mac: 02:00:98:42:f3:45
owner: 4
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 618
- fields:
comment: ''
description: ''
groups: [5, 7]
hostname: cporta
ipv4: 152.66.243.81
ipv6: 2001:738:2001:4031:66:243:81:0
location: ''
mac: 02:00:98:42:f3:51
owner: 3
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 623
- fields:
comment: ''
description: cloud-os gep
groups: [5, 7]
hostname: ui
ipv4: 152.66.243.73
ipv6: 2001:738:2001:4031:66:243:73:0
location: ''
mac: 02:00:98:42:f3:49
owner: 5
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 630
- fields:
comment: ''
description: cloud-os gep
groups: [5, 7]
hostname: vers
ipv4: 152.66.243.74
ipv6: 2001:738:2001:4031:66:243:74:0
location: ''
mac: 02:00:98:42:f3:4a
owner: 5
pub_ipv4: null
rules: []
shared_ip: false
vlan: 7
model: firewall.host
pk: 631
- fields:
comment: ''
description: ''
groups: [4]
hostname: id-145_user-test
ipv4: 10.9.1.6
ipv6: 2001:738:2001:4031:9:1:6:0
location: ''
mac: 02:00:0a:09:01:06
owner: 7
pub_ipv4: 152.66.243.62
rules: [978]
shared_ip: true
vlan: 10
model: firewall.host
pk: 635
- fields:
comment: "Migr\xE1lva r\xE9gi cloudr\xF3l: 2013-01-22"
description: "Han\xE1k P\xE9ter win7 g\xE9pe"
groups: [4]
hostname: id-708-Hanak-Windows7
ipv4: 10.9.1.9
ipv6: 2001:738:2001:4031:9:1:9:0
location: cloud-os gep
mac: 02:00:0a:09:01:09
owner: 5
pub_ipv4: 152.66.243.62
rules: [984, 985]
shared_ip: true
vlan: 10
model: firewall.host
pk: 640
- fields:
comment: ''
description: lennon laptopja
groups: [1]
hostname: lennon
ipv4: 10.5.253.11
ipv6: 2001:738:2001:4031:5:253:11:0
location: ''
mac: a4:ba:db:d7:96:4c
owner: 6
pub_ipv4: null
rules: []
shared_ip: false
vlan: 1
model: firewall.host
pk: 645
- fields:
comment: ''
description: ''
groups: [4]
hostname: id-156_user-lennon
ipv4: 10.9.1.13
ipv6: 2001:738:2001:4031:9:1:13:0
location: ''
mac: 02:00:0a:09:01:0d
owner: 6
pub_ipv4: 152.66.243.62
rules: [994]
shared_ip: true
vlan: 10
model: firewall.host
pk: 648
- fields:
comment: ''
description: ''
groups: [4]
hostname: id-158_user-K7YLW5
ipv4: 10.9.1.15
ipv6: 2001:738:2001:4031:9:1:15:0
location: ''
mac: 02:00:0a:09:01:0f
owner: 14
pub_ipv4: 152.66.243.62
rules: [996]
shared_ip: true
vlan: 10
model: firewall.host
pk: 650
- fields:
comment: ''
description: ''
groups: [4]
hostname: id-161_user-root
ipv4: 10.9.1.17
ipv6: 2001:738:2001:4031:9:1:17:0
location: ''
mac: 02:00:0a:09:01:11
owner: 1
pub_ipv4: 152.66.243.62
rules: [999]
shared_ip: true
vlan: 10
model: firewall.host
pk: 653
- fields:
comment: ''
description: ''
groups: [4]
hostname: id-165_user-K2JL24
ipv4: 10.9.1.21
ipv6: 2001:738:2001:4031:9:1:21:0
location: ''
mac: 02:00:0a:09:01:15
owner: 11
pub_ipv4: 152.66.243.62
rules: [1003]
shared_ip: true
vlan: 10
model: firewall.host
pk: 657
- fields:
comment: ''
description: ''
groups: [4]
hostname: id-166_user-TFDAZ6
ipv4: 10.9.1.26
ipv6: 2001:738:2001:4031:9:1:26:0
location: ''
mac: 02:00:0a:09:01:1a
owner: 13
pub_ipv4: 152.66.243.62
rules: []
shared_ip: true
vlan: 10
model: firewall.host
pk: 664
- fields:
comment: ''
description: ''
groups: [4]
hostname: id-167_user-TFDAZ6
ipv4: 10.9.1.27
ipv6: 2001:738:2001:4031:9:1:27:0
location: ''
mac: 02:00:0a:09:01:1b
owner: 13
pub_ipv4: 152.66.243.62
rules: []
shared_ip: true
vlan: 10
model: firewall.host
pk: 665
- fields:
comment: ''
description: ''
groups: [4]
hostname: id-169_user-TFDAZ6
ipv4: 10.9.1.29
ipv6: 2001:738:2001:4031:9:1:29:0
location: ''
mac: 02:00:0a:09:01:1d
owner: 13
pub_ipv4: 152.66.243.62
rules: []
shared_ip: true
vlan: 10
model: firewall.host
pk: 667
- fields:
comment: ''
description: cloud-os gep
groups: [4]
hostname: id-740-one-740
ipv4: 10.9.1.30
ipv6: 2001:738:2001:4031:9:1:30:0
location: ''
mac: 02:00:0a:09:01:1e
owner: 5
pub_ipv4: 152.66.243.62
rules: [1021, 1022]
shared_ip: true
vlan: 10
model: firewall.host
pk: 668
- fields:
name: default
rules: [12, 15, 26, 31, 35, 36, 38, 867]
model: firewall.firewall
pk: 1
#!/bin/bash
if [ -z "$SSH_AUTH_SOCK" ]
then
cat <<A
Use SSH authentication agent forwarding ("ssh -A cloud@host").
On the client side you can use "ssh-add [filename]" to let the agent know more keys.
In .ssh/config you can also use "ForwardAgent yes" setting.
A
exit 1
fi
if ! git config user.name
then
echo -n "Your name: "
read NAME
git config --global user.name "$NAME"
fi
mysql <<A
DROP USER webadmin@localhost;
A
mysql <<A
DROP DATABASE webadmin;
A
set -e
mysql <<A
CREATE USER webadmin@localhost IDENTIFIED BY 'asjklddfjklqjf';
CREATE DATABASE webadmin CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL ON webadmin.* TO webadmin@localhost;
A
cd /opt/webadmin/
mv cloud cloud.$(date +%s) || true
git clone 'ssh://git@giccero.cloud.ik.bme.hu/cloud'
cd cloud
./manage.py syncdb --noinput
./manage.py migrate
./manage.py createsuperuser --email=cloud@ik.bme.hu
./manage.py loaddata /home/cloud/user.yaml 2>/dev/null || true
./manage.py loaddata /home/cloud/fw.yaml
./manage.py loaddata /home/cloud/one.yaml
./manage.py update
- fields: {name: wifi, nat: true, public: false}
model: one.network
pk: 1
- fields: {CPU: 1, RAM: 102, name: small}
model: one.instancetype
pk: 1
- fields: {access_type: ssh, created_at: !!timestamp '2013-01-24 23:06:00+00:00', disk: 1, instance_type: 1, name: tty, network: 1, owner: 1}
model: one.template
pk: 1
- fields: {name: Copy of ttylinux - kvm}
model: one.disk
pk: 1
- fields:
comment: ''
description: ''
dhcp_pool: manual
domain: wifi.ik.bme.hu
interface: fake
ipv4: 192.168.255.254
ipv6: 2001:738:2001:4031:168:255:254:0
name: 'wifi'
net4: 192.168.0.0
net6: '2001:738:2001:4031:168::'
prefix4: 16
prefix6: 80
snat_ip: 152.66.243.160
snat_to: [4, 7]
vid: 168
model: firewall.vlan
pk: 168
- fields:
date_joined: 2012-11-27 10:33:20+00:00
email: ''
first_name: ''
groups: []
is_active: true
is_staff: true
is_superuser: false
last_login: 2013-01-14 21:41:28+00:00
last_name: ''
password: pbkdf2_sha256$10000$nKZoYcdY1hCp$EUltsuHxLC4hYDMjh0P/3JCqZshnrvYTZpQDcotqjns=
user_permissions: []
username: bd
model: auth.user
pk: 2
- fields:
date_joined: 2012-11-27 10:40:57+00:00
email: ''
first_name: ''
groups: []
is_active: true
is_staff: false
is_superuser: false
last_login: 2012-11-27 10:40:57+00:00
last_name: ''
password: pbkdf2_sha256$10000$yQSOV0aqQyKoM$YryBbUnvH8pc3+OcpU6CoxPfxA+H/+s5LIRgKKbtrA=
user_permissions: []
username: mate
model: auth.user
pk: 3
- fields:
date_joined: 2012-11-27 10:41:08+00:00
email: ''
first_name: ''
groups: []
is_active: true
is_staff: false
is_superuser: false
last_login: 2012-11-27 10:41:08+00:00
last_name: ''
password: pbkdf2_sha256$10000$aDfLP2f50s9$/J3We6Rbgx5karvbK/xRcGJVPpQHKlPnGSxHMYl7/AgU=
user_permissions: []
username: tarokkk
model: auth.user
pk: 4
- fields:
date_joined: 2012-12-23 18:57:31+00:00
email: ''
first_name: ''
groups: []
is_active: true
is_staff: false
is_superuser: false
last_login: 2012-12-23 18:57:31+00:00
last_name: ''
password: pbkdf2_sha256$10000$fJrZiQ78vfDi$obQ8lqeEbWu1gJkUohGaL2VXDB+zHuc7qzrWwmDKye4=
user_permissions: []
username: opennebula
model: auth.user
pk: 5
- fields:
date_joined: 2013-01-14 15:01:51+00:00
email: ''
first_name: ''
groups: []
is_active: true
is_staff: true
is_superuser: true
last_login: 2013-01-14 15:07:27+00:00
last_name: ''
password: pbkdf2_sha256$10000$PxbeA5QOMTNr$hxUBeBD9yU7Gmu75+drJoqgpHFeYtop0w5ovx978Ec8=
user_permissions: []
username: lennon
model: auth.user
pk: 6
- fields:
date_joined: 2013-01-16 12:36:01+00:00
email: ''
first_name: ''
groups: []
is_active: true
is_staff: true
is_superuser: true
last_login: 2013-01-22 15:21:22+00:00
last_name: ''
password: pbkdf2_sha256$10000$gx04X6OpW8kW$iCU3cuhqQcvq7I8tRVkrnES03ty/3vqN8ou4xZgfPBQ=
user_permissions: []
username: test
model: auth.user
pk: 7
- fields:
date_joined: 2013-01-21 18:07:32+00:00
email: ''
first_name: ''
groups: []
is_active: true
is_staff: true
is_superuser: true
last_login: 2013-01-21 18:08:27+00:00
last_name: ''
password: pbkdf2_sha256$10000$1ckVZD48XFt8$7vj20S4x33KDRP/y02PKm8is9zf1FoLHJQ+xf1zhKzw=
user_permissions: []
username: test23
model: auth.user
pk: 9
- fields:
date_joined: 2013-01-21 18:11:21+00:00
email: ''
first_name: ''
groups: []
is_active: true
is_staff: true
is_superuser: true
last_login: 2013-01-22 00:09:01+00:00
last_name: ''
password: pbkdf2_sha256$10000$9gr7ctlRFCS8$A3Ex+7gs0OVU+SzZNvijisjvCQjBT6l0Tl3dGCQ5UEs=
user_permissions: []
username: test77
model: auth.user
pk: 10
- fields:
date_joined: 2013-01-22 23:03:18+00:00
email: orymate@gmail.com
first_name: "M\xE1t\xE9"
groups: []
is_active: true
is_staff: false
is_superuser: false
last_login: 2013-01-23 22:12:20+00:00
last_name: "\u0150ry"
password: '!'
user_permissions: []
username: K2JL24
model: auth.user
pk: 11
- fields:
date_joined: 2013-01-23 08:49:10+00:00
email: bd@doszgep.hu
first_name: "D\xE1niel"
groups: []
is_active: true
is_staff: false
is_superuser: false
last_login: 2013-01-23 11:30:27+00:00
last_name: Bach
password: '!'
user_permissions: []
username: JI1M92
model: auth.user
pk: 12
- fields:
date_joined: 2013-01-23 13:37:22+00:00
email: gubasanyi@gmail.com
first_name: "S\xE1ndor"
groups: []
is_active: true
is_staff: false
is_superuser: false
last_login: 2013-01-24 21:40:05+00:00
last_name: Guba
password: '!'
user_permissions: []
username: TFDAZ6
model: auth.user
pk: 13
- fields:
date_joined: 2013-01-23 15:04:46+00:00
email: madbence@gmail.com
first_name: Bence
groups: []
is_active: true
is_staff: false
is_superuser: false
last_login: 2013-01-23 15:04:46+00:00
last_name: "D\xE1nyi"
password: '!'
user_permissions: []
username: K7YLW5
model: auth.user
pk: 14
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment