Commit 0689cfbd by Dudás Ádám

Merge branch 'master' into dev-siliconbrain

Conflicts:
	cloud/urls.py
	firewall/admin.py
parents 458553dc 05d4ad46
......@@ -33,4 +33,6 @@ urlpatterns = patterns('',
url(r'^fwapi/$', 'firewall.views.firewall_api', name='firewall_api'),
url(r'^store/$', 'store.views.index', name='store_index'),
url(r'^store/top/$', 'store.views.toplist', name='store_top'),
url(r'^ajax/templateWizard$', 'one.views.ajax_template_wizard',
name='ajax_template_wizard'),
)
# -*- coding: utf8 -*-
from django.contrib import admin
from firewall.models import *
from django import contrib
......@@ -6,15 +8,23 @@ from django import contrib
class AliasInline(contrib.admin.TabularInline):
model = Alias
class RuleInline(contrib.admin.TabularInline):
model = Rule
class HostAdmin(admin.ModelAdmin):
list_display = ('hostname', 'vlan', 'ipv4', 'ipv6', 'pub_ipv4', 'mac',
'shared_ip', 'owner', 'groups_l', 'rules_l', 'description',
'reverse')
'shared_ip', 'owner', 'description', 'reverse', 'groups_l')
ordering = ('hostname', )
list_filter = ('owner', 'vlan', 'groups')
search_fields = ('hostname', 'description', 'ipv4', 'ipv6', 'mac')
filter_horizontal = ('groups', 'rules', )
inlines = (AliasInline, )
filter_horizontal = ('groups', )
inlines = (AliasInline, RuleInline)
def groups_l(self, instance):
retval = []
for i in instance.groups.all():
retval.append(i.name)
return u', '.join(retval)
class HostInline(contrib.admin.TabularInline):
model = Host
......@@ -22,29 +32,59 @@ class HostInline(contrib.admin.TabularInline):
'owner', 'reverse')
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', 'ipv4', 'net_ipv4', 'ipv6', 'net_ipv6',
'description', 'domain', 'snat_ip', )
ordering = ('vid', )
inlines = (HostInline, )
inlines = (RuleInline, )
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', 'owner', 'extra', 'direction',
'accept', 'proto', 'sport', 'dport', 'nat', 'nat_dport', 'used_in')
list_filter = ('r_type', 'vlan', 'owner', 'direction', 'accept',
'proto', 'nat')
def color_desc(self, instance):
para = '</span>'
if(instance.dport):
para = "dport=%s %s" % (instance.dport, para)
if(instance.sport):
para = "sport=%s %s" % (instance.sport, para)
if(instance.proto):
para = "proto=%s %s" % (instance.proto, para)
para= u'<span style="color: #00FF00;">' + para
return u'<span style="color: #FF0000;">[' + instance.r_type + u']</span> ' + (instance.foreign_network.name + u'<span style="color: #0000FF;"> ▸ </span>' + instance.r_type if instance.direction=='1' else instance.r_type + u'<span style="color: #0000FF;"> ▸ </span>' + instance.foreign_network.name) + ' ' + para + ' ' + instance.description
color_desc.allow_tags = True
def vlan_l(self, instance):
retval = []
for vl in instance.foreign_network.vlans.all():
retval.append(vl.name)
return u', '.join(retval)
def used_in(self, instance):
for field in [instance.vlan, instance.vlangroup, instance.host, instance.hostgroup, instance.firewall]:
if field is not None:
return unicode(field) + ' ' + field._meta.object_name
class AliasAdmin(admin.ModelAdmin):
list_display = ('alias', 'host')
class SettingAdmin(admin.ModelAdmin):
list_display = ('key', 'value')
list_display = ('key', 'value', 'description')
class GroupAdmin(admin.ModelAdmin):
list_display = ('name', 'owner', 'description')
inlines = (RuleInline, )
class FirewallAdmin(admin.ModelAdmin):
inlines = (RuleInline, )
admin.site.register(Host, HostAdmin)
admin.site.register(Vlan, VlanAdmin)
admin.site.register(Rule, RuleAdmin)
admin.site.register(Alias, AliasAdmin)
admin.site.register(Setting, SettingAdmin)
admin.site.register(Group)
admin.site.register(Firewall)
admin.site.register(Group, GroupAdmin)
admin.site.register(VlanGroup)
admin.site.register(Firewall, FirewallAdmin)
......@@ -38,6 +38,9 @@ class firewall:
self.SZABALYOK_NAT.append(s)
def host2vlan(self, host, rule):
if rule.foreign_network is None:
return
if(self.IPV6 and host.ipv6):
ipaddr = host.ipv6 + "/112"
else:
......@@ -45,7 +48,7 @@ class firewall:
dport_sport = self.dportsport(rule)
for vlan in rule.vlan.all():
for vlan in rule.foreign_network.vlans.all():
if(rule.accept):
if(rule.direction == '0' and vlan.name == "PUB"):
if(rule.dport == 25):
......@@ -64,18 +67,24 @@ class firewall:
def fw2vlan(self, rule):
if rule.foreign_network is None:
return
dport_sport = self.dportsport(rule)
for vlan in rule.vlan.all():
for vlan in rule.foreign_network.vlans.all():
if(rule.direction == '1'): # HOSTHOZ megy
self.iptables("-A INPUT -i %s %s %s -g %s" % (vlan.interface, dport_sport, rule.extra, "LOG_ACC" if rule.accept else "LOG_DROP"))
else:
self.iptables("-A OUTPUT -o %s %s %s -g %s" % (vlan.interface, dport_sport, rule.extra, "LOG_ACC" if rule.accept else "LOG_DROP"))
def vlan2vlan(self, l_vlan, rule):
if rule.foreign_network is None:
return
dport_sport = self.dportsport(rule)
for vlan in rule.vlan.all():
for vlan in rule.foreign_network.vlans.all():
if(rule.accept):
if((rule.direction == '0') and vlan.name == "PUB"):
action = "PUB_OUT"
......
# -*- 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 'VlanGroup'
db.create_table('firewall_vlangroup', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('modified_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
))
db.send_create_signal('firewall', ['VlanGroup'])
# Adding M2M table for field vlans on 'VlanGroup'
db.create_table('firewall_vlangroup_vlans', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('vlangroup', models.ForeignKey(orm['firewall.vlangroup'], null=False)),
('vlan', models.ForeignKey(orm['firewall.vlan'], null=False))
))
db.create_unique('firewall_vlangroup_vlans', ['vlangroup_id', 'vlan_id'])
# Removing M2M table for field rules on 'Host'
db.delete_table('firewall_host_rules')
# Adding field 'Setting.description'
db.add_column('firewall_setting', 'description',
self.gf('django.db.models.fields.TextField')(default='', blank=True),
keep_default=False)
# Adding field 'Group.description'
db.add_column('firewall_group', 'description',
self.gf('django.db.models.fields.TextField')(default='', blank=True),
keep_default=False)
# Adding field 'Group.owner'
db.add_column('firewall_group', 'owner',
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True),
keep_default=False)
# Removing M2M table for field rules on 'Group'
db.delete_table('firewall_group_rules')
# Adding field 'Vlan.owner'
db.add_column('firewall_vlan', 'owner',
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True),
keep_default=False)
# Removing M2M table for field rules on 'Vlan'
db.delete_table('firewall_vlan_rules')
# Adding field 'Rule.foreign_network'
db.add_column('firewall_rule', 'foreign_network',
self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='ForeignRules', to=orm['firewall.VlanGroup']),
keep_default=False)
# Adding field 'Rule.vlan'
db.add_column('firewall_rule', 'vlan',
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Vlan'], null=True, blank=True),
keep_default=False)
# Adding field 'Rule.vlangroup'
db.add_column('firewall_rule', 'vlangroup',
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.VlanGroup'], null=True, blank=True),
keep_default=False)
# Adding field 'Rule.host'
db.add_column('firewall_rule', 'host',
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Host'], null=True, blank=True),
keep_default=False)
# Adding field 'Rule.hostgroup'
db.add_column('firewall_rule', 'hostgroup',
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Group'], null=True, blank=True),
keep_default=False)
# Removing M2M table for field vlan on 'Rule'
db.delete_table('firewall_rule_vlan')
def backwards(self, orm):
# Deleting model 'VlanGroup'
db.delete_table('firewall_vlangroup')
# Removing M2M table for field vlans on 'VlanGroup'
db.delete_table('firewall_vlangroup_vlans')
# Adding M2M table for field rules on 'Host'
db.create_table('firewall_host_rules', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('host', models.ForeignKey(orm['firewall.host'], null=False)),
('rule', models.ForeignKey(orm['firewall.rule'], null=False))
))
db.create_unique('firewall_host_rules', ['host_id', 'rule_id'])
# Deleting field 'Setting.description'
db.delete_column('firewall_setting', 'description')
# Deleting field 'Group.description'
db.delete_column('firewall_group', 'description')
# Deleting field 'Group.owner'
db.delete_column('firewall_group', 'owner_id')
# Adding M2M table for field rules on 'Group'
db.create_table('firewall_group_rules', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('group', models.ForeignKey(orm['firewall.group'], null=False)),
('rule', models.ForeignKey(orm['firewall.rule'], null=False))
))
db.create_unique('firewall_group_rules', ['group_id', 'rule_id'])
# Deleting field 'Vlan.owner'
db.delete_column('firewall_vlan', 'owner_id')
# Adding M2M table for field rules on 'Vlan'
db.create_table('firewall_vlan_rules', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('vlan', models.ForeignKey(orm['firewall.vlan'], null=False)),
('rule', models.ForeignKey(orm['firewall.rule'], null=False))
))
db.create_unique('firewall_vlan_rules', ['vlan_id', 'rule_id'])
# Deleting field 'Rule.foreign_network'
db.delete_column('firewall_rule', 'foreign_network_id')
# Deleting field 'Rule.vlan'
db.delete_column('firewall_rule', 'vlan_id')
# Deleting field 'Rule.vlangroup'
db.delete_column('firewall_rule', 'vlangroup_id')
# Deleting field 'Rule.host'
db.delete_column('firewall_rule', 'host_id')
# Deleting field 'Rule.hostgroup'
db.delete_column('firewall_rule', 'hostgroup_id')
# Adding M2M table for field vlan on 'Rule'
db.create_table('firewall_rule_vlan', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('rule', models.ForeignKey(orm['firewall.rule'], null=False)),
('vlan', models.ForeignKey(orm['firewall.vlan'], null=False))
))
db.create_unique('firewall_rule_vlan', ['rule_id', 'vlan_id'])
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'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Host']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': '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'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
'firewall.host': {
'Meta': {'object_name': 'Host'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', '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'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'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'}),
'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'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'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'}),
'foreign_network': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ForeignRules'", 'to': "orm['firewall.VlanGroup']"}),
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Host']", 'null': 'True', 'blank': 'True'}),
'hostgroup': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Group']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': '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.ForeignKey', [], {'to': "orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'}),
'vlangroup': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.VlanGroup']", 'null': 'True', 'blank': 'True'})
},
'firewall.setting': {
'Meta': {'object_name': 'Setting'},
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'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'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', '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'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'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'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'prefix4': ('django.db.models.fields.IntegerField', [], {'default': '16'}),
'prefix6': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
'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'})
},
'firewall.vlangroup': {
'Meta': {'object_name': 'VlanGroup'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'vlans': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'})
}
}
complete_apps = ['firewall']
\ No newline at end of file
# -*- 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):
# Removing M2M table for field rules on 'Firewall'
db.delete_table('firewall_firewall_rules')
# Adding field 'Rule.firewall'
db.add_column('firewall_rule', 'firewall',
self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='rules', null=True, to=orm['firewall.Firewall']),
keep_default=False)
def backwards(self, orm):
# Adding M2M table for field rules on 'Firewall'
db.create_table('firewall_firewall_rules', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('firewall', models.ForeignKey(orm['firewall.firewall'], null=False)),
('rule', models.ForeignKey(orm['firewall.rule'], null=False))
))
db.create_unique('firewall_firewall_rules', ['firewall_id', 'rule_id'])
# Deleting field 'Rule.firewall'
db.delete_column('firewall_rule', 'firewall_id')
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'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Host']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': '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'})
},
'firewall.group': {
'Meta': {'object_name': 'Group'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
'firewall.host': {
'Meta': {'object_name': 'Host'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', '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'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'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'}),
'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'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'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'}),
'firewall': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'rules'", 'null': 'True', 'to': "orm['firewall.Firewall']"}),
'foreign_network': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ForeignRules'", 'to': "orm['firewall.VlanGroup']"}),
'host': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'rules'", 'null': 'True', 'to': "orm['firewall.Host']"}),
'hostgroup': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'rules'", 'null': 'True', 'to': "orm['firewall.Group']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': '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.ForeignKey', [], {'blank': 'True', 'related_name': "'rules'", 'null': 'True', 'to': "orm['firewall.Vlan']"}),
'vlangroup': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'rules'", 'null': 'True', 'to': "orm['firewall.VlanGroup']"})
},
'firewall.setting': {
'Meta': {'object_name': 'Setting'},
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'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'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', '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'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'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'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'prefix4': ('django.db.models.fields.IntegerField', [], {'default': '16'}),
'prefix6': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
'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'})
},
'firewall.vlangroup': {
'Meta': {'object_name': 'VlanGroup'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'vlans': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'})
}
}
complete_apps = ['firewall']
\ No newline at end of file
......@@ -12,6 +12,7 @@ from modeldict import ModelDict
class Setting(models.Model):
key = models.CharField(max_length=32)
value = models.CharField(max_length=200)
description = models.TextField(blank=True)
settings = ModelDict(Setting, key='key', value='value', instances=False)
......@@ -19,9 +20,10 @@ class Rule(models.Model):
CHOICES_type = (('host', 'host'), ('firewall', 'firewall'), ('vlan', 'vlan'))
CHOICES_proto = (('tcp', 'tcp'), ('udp', 'udp'), ('icmp', 'icmp'))
CHOICES_dir = (('0', 'out'), ('1', 'in'))
direction = models.CharField(max_length=1, choices=CHOICES_dir, blank=False)
description = models.TextField(blank=True)
vlan = models.ManyToManyField('Vlan', symmetrical=False, blank=True, null=True)
foreign_network = models.ForeignKey('VlanGroup', related_name="ForeignRules")
dport = models.IntegerField(blank=True, null=True, validators=[MinValueValidator(1), MaxValueValidator(65535)])
sport = models.IntegerField(blank=True, null=True, validators=[MinValueValidator(1), MaxValueValidator(65535)])
proto = models.CharField(max_length=10, choices=CHOICES_proto, blank=True, null=True)
......@@ -34,20 +36,22 @@ class Rule(models.Model):
created_at = models.DateTimeField(auto_now_add=True)
modified_at = models.DateTimeField(auto_now=True)
vlan = models.ForeignKey('Vlan', related_name="rules", blank=True, null=True)
vlangroup = models.ForeignKey('VlanGroup', related_name="rules", blank=True, null=True)
host = models.ForeignKey('Host', related_name="rules", blank=True, null=True)
hostgroup = models.ForeignKey('Group', related_name="rules", blank=True, null=True)
firewall = models.ForeignKey('Firewall', related_name="rules", blank=True, null=True)
def __unicode__(self):
return self.desc()
def color_desc(self):
para = '</span>'
if(self.dport):
para = "dport=%s %s" % (self.dport, para)
if(self.sport):
para = "sport=%s %s" % (self.sport, para)
if(self.proto):
para = "proto=%s %s" % (self.proto, para)
para= u'<span style="color: #00FF00;">' + para
return u'<span style="color: #FF0000;">[' + self.r_type + u']</span> ' + (self.vlan_l() + u'<span style="color: #0000FF;"> ▸ </span>' + self.r_type if self.direction=='1' else self.r_type + u'<span style="color: #0000FF;"> ▸ </span>' + self.vlan_l()) + ' ' + para + ' ' +self.description
color_desc.allow_tags = True
def clean(self):
count = 0
for field in [self.vlan, self.vlangroup, self.host, self.hostgroup, self.firewall]:
if field is None:
count = count + 1
if count != 4:
raise ValidationError('jaj')
def desc(self):
para = u""
......@@ -57,12 +61,7 @@ class Rule(models.Model):
para = "sport=%s %s" % (self.sport, para)
if(self.proto):
para = "proto=%s %s" % (self.proto, para)
return u'[' + self.r_type + u'] ' + (self.vlan_l() + u' ▸ ' + self.r_type if self.direction=='1' else self.r_type + u' ▸ ' + self.vlan_l()) + u' ' + para + u' ' +self.description
def vlan_l(self):
retval = []
for vl in self.vlan.all():
retval.append(vl.name)
return u', '.join(retval)
return u'[' + self.r_type + u'] ' + (unicode(self.foreign_network) + u' ▸ ' + self.r_type if self.direction=='1' else self.r_type + u' ▸ ' + unicode(self.foreign_network)) + u' ' + para + u' ' +self.description
class Vlan(models.Model):
vid = models.IntegerField(unique=True)
......@@ -76,34 +75,38 @@ class Vlan(models.Model):
ipv6 = models.GenericIPAddressField(protocol='ipv6', unique=True)
snat_ip = models.GenericIPAddressField(protocol='ipv4', blank=True, null=True)
snat_to = models.ManyToManyField('self', symmetrical=False, blank=True, null=True)
rules = models.ManyToManyField('Rule', related_name="%(app_label)s_%(class)s_related", symmetrical=False, blank=True, null=True)
description = models.TextField(blank=True)
comment = models.TextField(blank=True)
domain = models.TextField(blank=True, validators=[val_domain])
dhcp_pool = models.TextField(blank=True)
created_at = models.DateTimeField(auto_now_add=True)
owner = models.ForeignKey(User, blank=True, null=True)
modified_at = models.DateTimeField(auto_now=True)
def __unicode__(self):
return self.name
def net_ipv6(self):
return self.net6 + "/" + unicode(self.prefix6)
def net_ipv4(self):
return self.net4 + "/" + unicode(self.prefix4)
def rules_l(self):
retval = []
for rl in self.rules.all():
retval.append(unicode(rl))
return ', '.join(retval)
def snat_to_l(self):
retval = []
for rl in self.snat_to.all():
retval.append(unicode(rl))
return ', '.join(retval)
class VlanGroup(models.Model):
name = models.CharField(max_length=20, unique=True)
vlans = models.ManyToManyField('Vlan', symmetrical=False, blank=True, null=True)
description = models.TextField(blank=True)
owner = models.ForeignKey(User, blank=True, null=True)
created_at = models.DateTimeField(auto_now_add=True)
modified_at = models.DateTimeField(auto_now=True)
def __unicode__(self):
return self.name
class Group(models.Model):
name = models.CharField(max_length=20, unique=True)
rules = models.ManyToManyField('Rule', symmetrical=False, blank=True, null=True)
description = models.TextField(blank=True)
owner = models.ForeignKey(User, blank=True, null=True)
created_at = models.DateTimeField(auto_now_add=True)
modified_at = models.DateTimeField(auto_now=True)
......@@ -116,6 +119,7 @@ class Alias(models.Model):
owner = models.ForeignKey(User, null=True, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
modified_at = models.DateTimeField(auto_now=True)
class Meta:
verbose_name_plural = 'aliases'
......@@ -133,12 +137,12 @@ class Host(models.Model):
vlan = models.ForeignKey('Vlan')
owner = models.ForeignKey(User)
groups = models.ManyToManyField('Group', symmetrical=False, blank=True, null=True)
rules = models.ManyToManyField('Rule', symmetrical=False, blank=True, null=True)
created_at = models.DateTimeField(auto_now_add=True)
modified_at = models.DateTimeField(auto_now=True)
def __unicode__(self):
return self.hostname
def save(self, *args, **kwargs):
if not self.id and self.ipv6 == "auto":
self.ipv6 = ipv4_2_ipv6(self.ipv4)
......@@ -146,18 +150,9 @@ class Host(models.Model):
raise ValidationError("Ha a shared_ip be van pipalva, akkor egyedinek kell lennie a pub_ipv4-nek!")
if Host.objects.exclude(id=self.id).filter(pub_ipv4=self.ipv4):
raise ValidationError("Egy masik host natolt cimet nem hasznalhatod sajat ipv4-nek")
self.full_clean()
super(Host, self).save(*args, **kwargs)
def groups_l(self):
retval = []
for grp in self.groups.all():
retval.append(grp.name)
return ', '.join(retval)
def rules_l(self):
retval = []
for rl in self.rules.all():
retval.append(unicode(rl.color_desc()))
return '<br>'.join(retval)
rules_l.allow_tags = True
def enable_net(self):
self.groups.add(Group.objects.get(name="netezhet"))
......@@ -168,17 +163,9 @@ class Host(models.Model):
for host in Host.objects.filter(pub_ipv4=self.pub_ipv4):
if host.rules.filter(nat=True, proto=proto, dport=public):
raise ValidationError("A %s %s port mar hasznalva" % (proto, public))
rule = Rule(direction='1', owner=self.owner, description=u"%s %s %s ▸ %s" % (self.hostname, proto, public, private), dport=public, proto=proto, nat=True, accept=True, r_type="host", nat_dport=private)
rule = Rule(direction='1', owner=self.owner, dport=public, proto=proto, nat=True, accept=True, r_type="host", nat_dport=private, host=self, foreign_network=VlanGroup.objects.get(name=settings["default_vlangroup"]))
rule.full_clean()
rule.save()
rule.vlan.add(Vlan.objects.get(name="PUB"))
rule.vlan.add(Vlan.objects.get(name="HOT"))
rule.vlan.add(Vlan.objects.get(name="LAB"))
rule.vlan.add(Vlan.objects.get(name="DMZ"))
rule.vlan.add(Vlan.objects.get(name="VM-NET"))
rule.vlan.add(Vlan.objects.get(name="WAR"))
rule.vlan.add(Vlan.objects.get(name="OFF2"))
self.rules.add(rule)
def del_port(self, proto, public):
self.rules.filter(owner=self.owner, proto=proto, nat=True, dport=public).delete()
......@@ -194,7 +181,6 @@ class Host(models.Model):
class Firewall(models.Model):
name = models.CharField(max_length=20, unique=True)
rules = models.ManyToManyField('Rule', symmetrical=False, blank=True, null=True)
def __unicode__(self):
return self.name
......
......@@ -2,14 +2,13 @@
cd /opt/webadmin/
if [ -d cloud ]
then
:
:
else
echo Run init.sh? [N/y]
read
if [ "$REPLY" = y ]
then
passwd
/home/cloud/init.sh
fi
echo Run init.sh? [N/y]
read
if [ "$REPLY" = y ]
then
source /home/cloud/init.sh
fi
fi
cd cloud
cd /opt/webadmin/cloud
......@@ -8,7 +8,7 @@ then
exit 1
fi
cp /opt/webadmin/cloud/miscellaneous/devenv/{.bash_login,init.sh,clean.sh} ~/
rm -rf /opt/webadmin/cloud*
rm .bash_history
rm -f ~/.gitconfig
......@@ -20,3 +20,5 @@ DROP DATABASE webadmin;
A
sudo chpasswd <<<'cloud:ezmiez'
sudo passwd -e cloud
rm ~/.ssh/authorized_keys
description "IK Cloud Store REST Daemon"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec /opt/webadmin/cloud/miscellaneous/store-server/CloudStore.py
[
{
"pk": 7,
"model": "auth.user",
"fields": {
"username": "test",
"first_name": "",
"last_name": "",
"is_active": true,
"is_superuser": true,
"is_staff": true,
"last_login": "2013-01-30T23:33:32Z",
"groups": [],
"user_permissions": [],
"password": "pbkdf2_sha256$10000$LbTrj1qFLbLq$9F2K+3WXE/cb+/EjxwTf+1bmhKxm37MuTPZ/l7vyzn0=",
"email": "",
"date_joined": "2013-01-16T12:36:01Z"
}
},
{
"pk": 9,
"model": "one.template",
"fields": {
"name": "Ubuntu 12.04 desktop",
"created_at": "2013-01-31T10:11:08Z",
"access_type": "nx",
"instance_type": 3,
"owner": 1,
"disk": 1,
"network": 2
}
},
{
"pk": 10,
"model": "one.template",
"fields": {
"name": "Windows 7",
"created_at": "2013-01-31T10:11:21Z",
"access_type": "rdp",
"instance_type": 2,
"owner": 1,
"disk": 1,
"network": 2
}
},
{
"pk": 1,
"model": "store.setting",
"fields": {
"value": "True",
"key": "basic_auth"
}
},
{
"pk": 2,
"model": "store.setting",
"fields": {
"value": "False",
"key": "verify_ssl"
}
},
{
"pk": 3,
"model": "store.setting",
"fields": {
"value": "False",
"key": "ssl_auth"
}
},
{
"pk": 4,
"model": "store.setting",
"fields": {
"value": "IQu8Eice",
"key": "store_client_pass"
}
},
{
"pk": 5,
"model": "store.setting",
"fields": {
"value": "admin",
"key": "store_client_user"
}
},
{
"pk": 6,
"model": "store.setting",
"fields": {
"value": "/opt/webadmin/cloud/client.key",
"key": "store_client_key"
}
},
{
"pk": 7,
"model": "store.setting",
"fields": {
"value": "/opt/webadmin/cloud/client.crt",
"key": "store_client_cert"
}
},
{
"pk": 8,
"model": "store.setting",
"fields": {
"value": "http://localhost:9000",
"key": "store_url"
}
},
{
"pk": 2,
"model": "one.network",
"fields": {
"name": "VM-NET",
"nat": true,
"public": false
}
}
]
description "IK Cloud Django Development Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec /opt/webadmin/cloud/manage.py runserver 0.0.0.0:8080
- 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
......@@ -16,6 +16,9 @@ then
echo -n "Your name: "
read NAME
git config --global user.name "$NAME"
echo -n "Your e-mail address: "
read MAIL
git config --global user.email "$MAIL"
fi
......@@ -43,35 +46,5 @@ 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 loaddata /home/cloud/store.yaml
./manage.py update
#Set up store server
rm -rf /var/www/*
mkdir -p /var/www
cd /opt/webadmin/cloud/miscellaneous/store-server/
LOCAL_IP=$(ip addr show dev eth0|grep inet|head -1|awk '{print $2}'|cut -d '/' -f 1)
cat <<EOF > store.config
[store]
#Default root folder (for download and upload)
root_www_folder = /var/www
#Deafult binary folder (for executables)
root_bin_folder = /opt/webadmin/cloud/miscellaneous/store-server/
#Site host (for standalone server)
site_host = 0.0.0.0
#Site port (for standalone server)
site_port = 9000
#Site url (for download and upload links) %(variable)formatter ex: %(port)s
site_url = http://${LOCAL_IP}:%(site_port)s
#User manager script (add, del, set, update)
user_manager = FAKEUserManager.sh
#Temporary directory
temp_dir = /tmp/dl
EOF
sudo /opt/webadmin/cloud/miscellaneous/store-server/CloudStore.py >/dev/null 2>&1 &
source miscellaneous/devenv/nextinit.sh
set +e
#!/bin/bash
for i in cloudstore toplist django
do
sudo stop $i
done
set -x
cd /opt/webadmin/cloud
./manage.py syncdb --noinput
./manage.py migrate
./manage.py loaddata miscellaneous/dump.json
./manage.py loaddata miscellaneous/devenv/dev.json
./manage.py update
./manage.py loaddata miscellaneous/devenv/dev.json
set +x
#Set up store server
rm -rf /var/www/*
mkdir -p /var/www
cd /opt/webadmin/cloud/miscellaneous/store-server/
LOCAL_IP=$(ip addr show dev eth0|grep inet|head -1|awk '{print $2}'|cut -d '/' -f 1)
cat <<EOF > store.config
[store]
#Default root folder (for download and upload)
root_www_folder = /var/www
#Deafult binary folder (for executables)
root_bin_folder = /opt/webadmin/cloud/miscellaneous/store-server/
#Site host (for standalone server)
site_host = 0.0.0.0
#Site port (for standalone server)
site_port = 9000
#Site url (for download and upload links) %(variable)formatter ex: %(port)s
site_url = http://${LOCAL_IP}:%(site_port)s
#User manager script (add, del, set, update)
user_manager = FAKEUserManager.sh
#Temporary directory
temp_dir = /tmp/dl
EOF
for i in cloudstore toplist django
do
sudo cp /opt/webadmin/cloud/miscellaneous/devenv/$i.conf /etc/init/
sudo start $i
done
cd /opt/webadmin/cloud/miscellaneous/devenv
sudo cp vimrc.local /etc/vim/vimrc.local
cd /opt/webadmin/cloud
./manage.py changepassword test
true
- 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
description "IK Cloud Store Toplist Daemon"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec /opt/webadmin/cloud/miscellaneous/store-server/TopList.py
- 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$tHbyy0OTBCBQ$YVdhrXZVK6wi7Px/zX5zmpOGkQUnddXXdrwNFnJskx0=
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
highlight ExtraWhitespace ctermfg=white ctermbg=red guibg=red guifg=white
match ExtraWhitespace /\(\s\+$\|^\s*\t\|,[^ ]\|[;]$\|#[^ ].\|def [A-Z]\|class [a-z]\)/
autocmd BufWinEnter * match ExtraWhitespace /\(\s\+$\|^\s*\t\|,[^ ]\|[;]$\|#[^ ].\|def [A-Z]\|class [a-z]\)/
autocmd BufWinLeave * call clearmatches()
set et
set sw=4
set ai
set smarttab
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/bin/bash
/opt/webadmin/cloud/manage.py dumpdata -e admin -e one.userclouddetails -e school -e auth.permission -e contenttypes -e sessions -e djcelery --format=json --indent=2|grep -v '"password":'|sed -e 's/^.*"smb_password":.*$/"smb_password": "kamu",/' -e 's/BEGIN RSA PRIVATE.*END RSA/xxx/' >/opt/webadmin/cloud/miscellaneous/dump.json
<!DOCTYPE html>
<html lang="hu-hu">
<head>
<title>IK Cloud</title>
<link href='http://fonts.googleapis.com/css?family=Metrophobic' rel='stylesheet' type='text/css'>
<link rel="icon" type="image/png" href="/static/favicon.png" />
<link rel="icon" type="image/png" href="one/static/favicon.png">
<link rel="stylesheet/less" href="../../one/static/style.less" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../../one/static/jquery.min.js"></script>
<script src="../../one/static/less.min.js"></script>
<script type="text/javascript">
var toggleDetails1;
var toggleDetails2;
$(function(){
$('.wm .summary').each(function(){
this.originalHeight=parseInt($(this).next('.details').css('height'));
})
toggleDetails1=function(){
if($(this).next('.details').is(':hidden')){
$(this).next('.details').slideDown(700);
} else {
$(this).next('.details').slideUp(700);
}
}
toggleDetails2=function(){
if($(this).next('.template-details').is(':hidden')){
$(this).next('.template-details').slideDown(400);
} else {
$(this).next('.template-details').slideUp(400);
}
}
$('.wm .summary').click(toggleDetails1);
$('#template .wm .summary').click(toggleDetails2);
$('#load-more-files').click(function(){
$('.actions', this).show();
var that=this;
setTimeout(function(){
$(that).prev('li').slideDown(500,function(){
$('.actions', that).hide();
});
},2000);
})
$('#new-wm-button').click(function(){
$('#modal').show();
$('#modal-container').html($('#new-wm').html());
$('#modal-container .wm .summary').each(function(){
this.originalHeight=parseInt($(this).next('.details').css('height'));
})
$('#modal-container .wm .summary').click(toggleDetails);
});
$('#new-template-button').click(function(){
$('#modal').show();
$('#modal-container').html($('#new-template').html());
});
$('#shadow').click(function(){
$('#modal').hide();
})
$('#new-template-button').click(function(){
$.get('/ajax/templateWizard', function(data){
$('#modal-container').html(data);
})
$('#modal').show();
});
})
</script>
</head>
<body>
<div id="header">
<div id="loginblock"><p>
Bejelentkezve: cloud.
<a href="/logout/">Kijelentkezés</a>.
<a href="/admin/">Admin</a>.
</p>
</div>
<h1><a href="/">IK Cloud <span style="font-size: 21px">&beta;</span></a></h1>
</div>
<div id="content">
<div class="boxes">
<div class="contentblock" id="state">
<h2>Virtuális gépek</h2>
<ul class="wm-list">
<li class="wm">
<div class="summary">
<div class="name wm-on">
cloud test (32)
</div>
<div class="status">
ACTIVE
</div>
<div class="actions">
<a href="rdp:cloud:Q4EUrggGvr:152.66.243.62:3389" title="Csatlakozás"><img src="../../one/static/icons/plug.png" alt="connect" /></a>
<a href="/vm/suspend/7/" onclick="alert('Hamarosan a mozikban.'); return false" title="Felfüggesztés"><img src="../../one/static/icons/control-pause.png" alt="pause" /></a>
<a href="/vm/delete/7/" onclick="return confirm('Biztosan törli a gépet?')" title="Törlés"><img src="../../one/static/icons/minus-circle.png" alt="delete" /></a>
<a href="/vm/reset/7/" onclick="alert('Hamarosan a mozikban.'); return false" title="Újraindítás"><img src="../../one/static/icons/arrow-circle-double.png" alt="↺" /></a>
</div>
<div class="clear"></div>
</div>
<div class="details">
<div class="container">
<ul>
<li class="name">Gép neve: <span class="value">cloud test (32)</span></li>
<li class="os-linux">Operációs rendszer: <span class="value">Copy of ttylinux - kvm</span></li>
<li class="type">Instance típus: <span class="value">small</span></li>
<li class="date">Létrehozás dátuma: <span class="value">2013. január 30. 14.56.34</span></li>
<li class="date">Lejáratig: <span class="value"><abbr title="1 nap, 5 óra, 34 perc">1 nap</abbr></span></li>
<li>&nbsp;<span class="value"><a href="/vm/show/7/" title="cloud test (32)">További részletek</a></span></li>
</ul>
</div>
</div>
</li>
<li id="new-wm-button" class="wm new">
<div class="summary">
<div class="name">Új gép indítása</div>
<div class="clear"></div>
</div>
</li>
<li id="new-wm" style="display: none">
<h2>Rendelkezésre álló sablonok</h2>
<p>
Mese, hogy mit is lehet csinálni.
</p>
<div class="container">
<ul class="wm-list modal">
<li class="wm">
<form method="POST" action="/vm/new/2/"><div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='QQdfjrFaIqdVw8NqhxyPVQIeuiHIzxjJ' /></div>
<div class="summary">
<div class="name wm-on">test</div>
<div class="status">
3/10
</div>
<div class="clear"></div>
</div>
<div class="details">
<h3>
Részletek
</h3>
<ul>
<li class="name">Rendszer: <span class="value">Copy of ttylinux - kvm</span></li>
<li class="type">Instance típus: <span class="value">small</span></li>
<li class="memory">Memória: <span class="value">100 MiB</span></li>
<li class="cpu">CPU magok: <span class="value">1</span></li>
<li>&nbsp;<span class="value"><input type="submit" value="Indítás"/></span></li>
</ul>
</div>
</form>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="contentblock" id="template">
<h2>Saját sablonok</h2>
<ul class="wm-list">
<li class="wm">
<div class="summary">
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.2); width: 20%"></div>
</div>
<div class="name">Win7 Matlab (1$/instance)</div>
<div class="status">2$/10$</div>
<div class="actions">
<a href="#" title="Átnevezés"><img src="../../one/static/icons/pencil.png" alt="rename" /></a>
<a href="#" title="Törlés"><img src="../../one/static/icons/minus-circle.png" alt="delete" /></a>
<a href="#" title="Megosztás"><img src="../../one/static/icons/user-share.png" alt="share" /></a>
</div>
<div class="clear"></div>
</div>
<div class="template-details">
<ul>
<li>
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.2); width: 16%"></div>
</div>
<div class="group-name">
<a href="#">Csoport1 (6 user)</a>
</div>
<div class="status">
1/6 (1 instance/user)
</div>
<div class="clear"></div>
</li>
<li>
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.2); width: 25%"></div>
</div>
<div class="group-name">
<a href="#">Csoport2 (2 user)</a>
</div>
<div class="status">
1/4 (2 instance/user)
</div>
<div class="clear"></div>
</li>
</ul>
</div>
</li>
<li class="wm">
<div class="summary">
<div class="quota">
<div class="used" style="background-color: rgba(255,128,0,0.2); width: 50%"></div>
</div>
<div class="name">Linux Java (1$/instance)</div>
<div class="status">20$/40$</div>
<div class="actions">
<a href="#" title="Átnevezés"><img src="../../one/static/icons/pencil.png" alt="rename" /></a>
<a href="#" title="Törlés"><img src="../../one/static/icons/minus-circle.png" alt="delete" /></a>
<a href="#" title="Megosztás"><img src="../../one/static/icons/user-share.png" alt="share" /></a>
</div>
<div class="clear"></div>
</div>
<div class="template-details">
<ul>
<li>
<div class="quota">
<div class="used" style="background-color: rgba(255,0,0,0.2); width: 100%"></div>
</div>
<div class="group-name">
<a href="#">Csoport1 (6 user)</a>
</div>
<div class="status">
6/6 (1 instance/user)
</div>
<div class="clear"></div>
</li>
<li>
<div class="quota">
<div class="used" style="background-color: rgba(255,128,0,0.2); width: 75%"></div>
</div>
<div class="group-name">
<a href="#">Csoport2 (4 user)</a>
</div>
<div class="status">
3/4 (1 instance/user)
</div>
<div class="clear"></div>
</li>
<li>
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.2); width: 10%"></div>
</div>
<div class="group-name">
<a href="#">Csoport3 (5 user)</a>
</div>
<div class="status">
1/10 (2 instance/user)
</div>
<div class="clear"></div>
</li>
<li>
<div class="quota">
<div class="used" style="background-color: rgba(200,200,0,0.2); width: 50%"></div>
</div>
<div class="group-name">
<a href="#">Csoport4 (20 user)</a>
</div>
<div class="status">
10/20 (1 instance/user)
</div>
<div class="clear"></div>
</li>
</ul>
</div>
</li>
<li id="new-template-button" class="wm new">
<div class="summary">
<div class="name">Új Sablon</div>
<div class="clear"></div>
</div>
</li>
<li class="wm small">
<div class="summary">
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.5); width: 19%"></div>
</div>
<div class="name">Kvóta: 50/100</div>
<div class="clear"></div>
</div>
</li>
</ul>
</div>
</div>
<div class="boxes">
<div class="contentblock">
<h2>
Adattár
</h2>
<div class="content">
<ul class="file-list">
<li class="wm">
<div class="summary">
<div class="name filetype-c">hello.c</div>
<div class="info">1 Kb</div>
<div class="actions">
<a href="#"><img src="../../one/static/icons/pencil.png" alt="rename" /></a>
<a href="#"><img src="../../one/static/icons/minus-circle.png" alt="delete" /></a>
<a href="#"><img src="../../one/static/icons/download-cloud.png" alt="download" /></a>
</div>
<div class="clear"></div>
</div>
<div class="details">
<h3>Részletek</h3>
<ul>
<li>Létrehozva: <span class="value">2012.12.29. 23:12</span></li>
<li>Módosítva: <span class="value">2012.12.29. 23:12</span></li>
<li>Hozzáférés: <span class="value">2012.12.29. 23:12</span></li>
<li>Típus: <span class="value">text/plain</span></li>
</ul>
</div>
</li>
<li class="wm">
<div class="summary">
<div class="name filetype-image">suna.jpg</div>
<div class="info">1 Kb</div>
<div class="actions">
<a href="#"><img src="../../one/static/icons/pencil.png" alt="rename" /></a>
<a href="#"><img src="../../one/static/icons/minus-circle.png" alt="delete" /></a>
<a href="#"><img src="../../one/static/icons/download-cloud.png" alt="download" /></a>
</div>
<div class="clear"></div>
</div>
<div class="details">
<h3>Részletek</h3>
<ul>
<li>Létrehozva: <span class="value">2012.12.29. 23:12</span></li>
<li>Módosítva: <span class="value">2012.12.29. 23:12</span></li>
<li>Hozzáférés: <span class="value">2012.12.29. 23:12</span></li>
<li>Típus: <span class="value">image/jpg</span></li>
</ul>
</div>
</li>
<li class="wm">
<div class="summary">
<div class="name filetype-folder">poresz</div>
<div class="info">katalógus</div>
<div class="actions">
<a href="#"><img src="../../one/static/icons/pencil.png" alt="rename" /></a>
<a href="#"><img src="../../one/static/icons/minus-circle.png" alt="delete" /></a>
</div>
<div class="clear"></div>
</div>
<div class="details">
<h3>Részletek</h3>
<ul>
<li>Létrehozva: <span class="value">2012.12.29. 23:12</span></li>
<li>Módosítva: <span class="value">2012.12.29. 23:12</span></li>
<li>Hozzáférés: <span class="value">2012.12.29. 23:12</span></li>
<li>Fájlok: <span class="value">666 db</span></li>
</ul>
</div>
</li>
<li class="wm" style="display: none">
<div class="summary">
<div class="name filetype-text">matlab_serial.txt</div>
<div class="info">358 Kb</div>
<div class="actions">
<a href="#"><img src="../../one/static/icons/pencil.png" alt="rename" /></a>
<a href="#"><img src="../../one/static/icons/minus-circle.png" alt="delete" /></a>
<a href="#"><img src="../../one/static/icons/download-cloud.png" alt="download" /></a>
</div>
<div class="clear"></div>
</div>
<div class="details">
<h3>Részletek</h3>
<ul>
<li>Létrehozva: <span class="value">2012.12.29. 23:12</span></li>
<li>Módosítva: <span class="value">2012.12.29. 23:12</span></li>
<li>Hozzáférés: <span class="value">2012.12.29. 23:12</span></li>
<li>Típus: <span class="value">text/plain</span></li>
</ul>
</div>
</li>
<li class="file-details wm" id="load-more-files">
<div class="summary">
<div class="name filetype-more">
Mutasd a régebbi fájlokat!
</div>
<div class="actions" style="text-align: right; display: none">
<img src="/static/load-4.gif" alt="loading" />
</div>
<div class="clear"></div>
</div>
</li>
<li class="file-upload wm">
<div class="summary">
<div class="name filetype-up">Fájlfeltöltés</div>
<div class="clear"></div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div id="modal" style="display: none">
<div id="shadow"></div>
<div id="modal-container">
</div>
</div>
</body>
</html>
......@@ -183,7 +183,7 @@ class Network(models.Model):
cls.objects.exclude(id__in=l).delete()
def __unicode__(self):
return u"%s (vlan%03d)" % (self.name, self.id)
return self.name
class Meta:
ordering = ['name']
......@@ -392,8 +392,7 @@ class Instance(models.Model):
host.hostname = u"id-%d_user-%s" % (inst.id, owner.username)
host.mac = x.getElementsByTagName("MAC")[0].childNodes[0].nodeValue
host.ipv4 = inst.ip
host.pub_ipv4 = "152.66.243.62"
host.full_clean()
host.pub_ipv4 = Vlan.objects.get(name=template.network.name).snat_ip
host.save()
host.enable_net()
host.add_port("tcp", inst.get_port(), {"rdp": 3389, "nx": 22, "ssh": 22}[inst.template.access_type])
......@@ -409,7 +408,6 @@ class Instance(models.Model):
proc = subprocess.Popen(["/opt/occi.sh", "compute",
"delete", "%d"%self.one_id], stdout=subprocess.PIPE)
(out, err) = proc.communicate()
self.firewall_host.del_rules()
self.firewall_host.delete()
reload_firewall_lock()
......
......@@ -61,11 +61,35 @@
&.opened .actions{
display: block !important;
}
&.small .summary{
padding: 5px;
cursor: default;
&:hover{
background-color: #c1c1c1;
}
.name{
background: none !important;
text-align: center;
float: none;
}
}
.quota{
left: 0;
top: 0;
z-index: 0;
position: absolute;
width: 100%;
height: 100%;
.used{
height: 100%;
}
}
.summary{
padding: 15px 5px;
border-top: 1px solid #888;
cursor: pointer;
background-color: #c1c1c1;
position: relative;
&.unfinished{
background-color: #FFFF66;
}
......@@ -75,6 +99,7 @@
display: block;
}
}
.id{
float: right;
width: 30px;
......@@ -84,16 +109,22 @@
padding-left: 25px;
background-repeat: no-repeat;
background-position: 0 0;
z-index: 2;
position: relative;
}
.status{
text-align: right;
float: right;
width: 60px;
z-index: 2;
position: relative;
}
.actions{
float: right;
margin-left: 5px;
display: none;
z-index: 2;
position: relative;
a{
height: 16px;
width: 16px;
......@@ -110,21 +141,26 @@
.details{
border-top: 1px solid #888;
background-color: #d1d1d1;
padding: 15px 5px;
display: none;
.container{
padding: 5px 5px;
}
h3{
font-weight: normal;
}
ul{
list-style: none;
margin: 10px 3px;
margin: 0px 5px;
}
li{
margin: 12px 0px;
margin: 8px 0px 4px 0px;
padding: 3px 0px 3px 20px;
border-bottom: 1px dotted #aaa;
background-repeat: no-repeat;
background-position: 0px 4px;
&:last-child{
border-bottom: none;
};
}
a{
text-decoration: underline;
......@@ -164,6 +200,8 @@
background-image: url(icons/document-snippet.png);
.value{
font-size: 0.8em;
word-spacing: 3px;
width: 350px;
}
}
}
......@@ -230,3 +268,35 @@
.wm-list.modal .wm:nth-child(1) .summary{
border-top: none;
}
#template{
.wm {
.template-details{
margin: 0;
padding: 0;
border-top: 1px solid #888;
display: none;
ul{
list-style-type: none;
}
li{
padding-left: 10px;
border-top: 1px solid #aaa;
position: relative;
&:first-child{
border-top: none;
};
.status{
float: right;
padding: 0 5px;
}
.group-name{
float: left;
line-height: 1.5em;
z-index: 2;
position: relative;
}
}
}
}
}
#modal{
top: 0;
position: absolute;
width: 100%;
height: 100%;
z-index: 999;
}
#shadow{
position: absolute;
position: fixed;
height: 100%;
width: 100%;
background-color: rgba(0,0,0,0.6);
......
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>404 - A manóba</title>
</head>
<body>
<h1>404 - A manóba!</h1>
</body>
</html>
......@@ -12,11 +12,12 @@
<script src="/static/jquery.min.js"></script>
<script src="/static/less.min.js"></script>
<script type="text/javascript">
var toggleDetails;
$(function(){
$('.wm .summary').each(function(){
this.originalHeight=parseInt($(this).next('.details').css('height'));
})
var toggleDetails=function(){
toggleDetails=function(){
if($(this).next('.details').is(':hidden')){
$(this).next('.details')
.show()
......@@ -47,20 +48,26 @@ $(function(){
},2000);
})
$('#new-wm-button').click(function(){
$('#modal').show();
$('#modal-container').html($('#new-wm').html());
$('#modal-container .wm .summary').each(function(){
this.originalHeight=parseInt($(this).next('.details').css('height'));
})
$('#modal-container .wm .summary').click(toggleDetails);
});
$('#modal').show();
$('#modal-container').html($('#new-wm').html());
$('#modal-container .wm .summary').each(function(){
this.originalHeight=parseInt($(this).next('.details').css('height'));
})
$('#modal-container .wm .summary').click(toggleDetails);
});
$('#new-template-button').click(function(){
$('#modal').show();
$('#modal-container').html($('#new-template').html());
$('#modal').show();
$('#modal-container').html($('#new-template').html());
});
$('#shadow').click(function(){
$('#modal').hide();
$('#modal').hide();
})
$('#new-template-button').click(function(){
$.get('/ajax/templateWizard', function(data){
$('#modal-container').html(data);
})
$('#modal').show();
});
})
</script>
......@@ -94,7 +101,7 @@ $(function(){
{% endblock %}
{% block header %}
{% block header_title %}
<h1><a href="/">IK Cloud</a></h1>
<h1><a href="/">IK Cloud <span style="font-size: 21px">&beta;</span></a></h1>
{% endblock %}
{% endblock %}
</div>
......@@ -109,10 +116,12 @@ $(function(){
<div id="content">
{% block content %}{% endblock %}
<div class="clear"></div>
</div>
<div id="modal" style="display: none">
<div id="shadow"></div>
<div id="modal-container">
</div>
</div>
</body>
......
......@@ -15,6 +15,9 @@
</li>
<li id="new-wm" style="display: none">
<h2>Rendelkezésre álló sablonok</h2>
<p>
Mese, hogy mit is lehet csinálni.
</p>
<div class="container">
<ul class="wm-list modal">
{% for m in templates %}
......@@ -23,7 +26,7 @@
<div class="summary">
<div class="name wm-on">{{m.name}}</div>
<div class="status">
<input type="submit" value="Indítás"/>
3/10
</div>
<div class="clear"></div>
</div>
......@@ -36,6 +39,7 @@
<li class="type">Instance típus: <span class="value">{{m.instance_type.name}}</span></li>
<li class="memory">Memória: <span class="value">{{m.instance_type.RAM}} MiB</span></li>
<li class="cpu">CPU magok: <span class="value">{{m.instance_type.CPU}}</span></li>
<li>&nbsp;<span class="value"><input type="submit" value="Indítás"/></span></li>
</ul>
</div>
</form>
......@@ -51,7 +55,61 @@
<ul class="wm-list">
<li class="wm">
<div class="summary">
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.5); width: 20%"></div>
</div>
<div class="name">Win7 Matlab</div>
<div class="status">2/10</div>
<div class="actions">
<a href="#" title="Átnevezés"><img src="/static/icons/pencil.png" alt="rename" /></a>
<a href="#" title="Törlés"><img src="/static/icons/minus-circle.png" alt="delete" /></a>
<a href="#" title="Megosztás"><img src="static/icons/user-share.png" alt="share" /></a>
</div>
<div class="clear"></div>
</div>
<div class="details">
<h3>Részletek</h3>
<ul>
<li class="name">Rendszer: <span class="value">Windows 7 Desktop</span></li>
<li class="description">Leírás: <span class="value">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nibh arcu, cursus et sodales eu, iaculis id metus. Suspendisse et mauris nisi, luctus feugiat nisi. Nullam elementum tincidunt urna a luctus.</span><div class="clear"></div></li>
<li class="date">Létrehozva: <span class="value">2013.01.10. 13:40:22</span></li>
<li class="date">Módosítva: <span class="value">2013.01.10. 13:40:22</span></li>
<li class="count">Futó példányok: <span class="value">1 db</span></li>
</ul>
</div>
</li>
<li class="wm">
<div class="summary">
<div class="quota">
<div class="used" style="background-color: rgba(255,128,0,0.5); width: 70%"></div>
</div>
<div class="name">Win7 Matlab</div>
<div class="status">7/10</div>
<div class="actions">
<a href="#" title="Átnevezés"><img src="/static/icons/pencil.png" alt="rename" /></a>
<a href="#" title="Törlés"><img src="/static/icons/minus-circle.png" alt="delete" /></a>
<a href="#" title="Megosztás"><img src="static/icons/user-share.png" alt="share" /></a>
</div>
<div class="clear"></div>
</div>
<div class="details">
<h3>Részletek</h3>
<ul>
<li class="name">Rendszer: <span class="value">Windows 7 Desktop</span></li>
<li class="description">Leírás: <span class="value">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nibh arcu, cursus et sodales eu, iaculis id metus. Suspendisse et mauris nisi, luctus feugiat nisi. Nullam elementum tincidunt urna a luctus.</span><div class="clear"></div></li>
<li class="date">Létrehozva: <span class="value">2013.01.10. 13:40:22</span></li>
<li class="date">Módosítva: <span class="value">2013.01.10. 13:40:22</span></li>
<li class="count">Futó példányok: <span class="value">5 db</span></li>
</ul>
</div>
</li>
<li class="wm">
<div class="summary">
<div class="quota">
<div class="used" style="background-color: rgba(255,0,0,0.5); width: 100%"></div>
</div>
<div class="name">Win7 Matlab</div>
<div class="status">10/10</div>
<div class="actions">
<a href="#" title="Átnevezés"><img src="/static/icons/pencil.png" alt="rename" /></a>
<a href="#" title="Törlés"><img src="/static/icons/minus-circle.png" alt="delete" /></a>
......@@ -66,7 +124,7 @@
<li class="description">Leírás: <span class="value">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nibh arcu, cursus et sodales eu, iaculis id metus. Suspendisse et mauris nisi, luctus feugiat nisi. Nullam elementum tincidunt urna a luctus.</span><div class="clear"></div></li>
<li class="date">Létrehozva: <span class="value">2013.01.10. 13:40:22</span></li>
<li class="date">Módosítva: <span class="value">2013.01.10. 13:40:22</span></li>
<li class="count">Aktív példányok: <span class="value">8 db</span></li>
<li class="count">Futó példányok: <span class="value">10 db</span></li>
</ul>
</div>
</li>
......@@ -87,7 +145,7 @@
<li class="description">Leírás: <span class="value">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nibh arcu, cursus et sodales eu, iaculis id metus. Suspendisse et mauris nisi, luctus feugiat nisi. Nullam elementum tincidunt urna a luctus.</span><div class="clear"></div></li>
<li class="date">Létrehozva: <span class="value">2013.01.10. 13:40:22</span></li>
<li class="date">Módosítva: <span class="value">2013.01.10. 13:40:22</span></li>
<li class="count">Aktív példányok: <span class="value">8 db</span></li>
<li class="count">Futó példányok: <span class="value">8 db</span></li>
</ul>
</div>
</li>
......@@ -97,9 +155,15 @@
<div class="clear"></div>
</div>
</li>
<script type="text/html" id="new-template" style="display: none">
{% include "new-template-flow.html" %}
</script>
<li class="wm small">
<div class="summary">
<div class="quota">
<div class="used" style="background-color: rgba(0,255,0,0.5); width: 19%"></div>
</div>
<div class="name">Kvóta: 19/100</div>
<div class="clear"></div>
</div>
</li>
</ul>
</div>
{% for box in boxes %}
......
<form action="/" method="post">
<form action="/" method="post" id="template-wizard">
<div id="new-template-step-1" class="wizard">
<div class="progress">
<div class="bar-container">
......@@ -57,11 +57,100 @@
<a href="#" class="next">Tovább &raquo;</a>
<div class="clear"></div>
</nav>
<script type="text/javascript">
$(function(){
$('#new-template-step-1 nav .next').click(function(){
$('#new-template-step-1').hide();
$('#new-template-step-2').show();
})
$('#new-template-step-1 nav .prev').click(function(){
$('#modal').hide();
})
})
</script>
</div>
<div id="new-template-step-2" style="display: none">
<div id="new-template-step-2" class="wizard" style="display: none">
<div class="progress">
<div class="bar-container">
<div class="bar" style="width: 66%"></div>
</div>
<h3>2/3</h3>
</div>
<h2>2. lépés</h2>
<p>Leírás, mit is kéne itt ezen az ablakon csinálni, és miért jó, ha azt csinálja, amit.</p>
<div class="container">
<ul class="wm-list modal">
{% for m in templates %}
<li class="wm">
<form method="POST" action="/vm/new/{{m.pk}}/">{% csrf_token %}
<div class="summary">
<div class="name wm-on">{{m.name}}</div>
<div class="status">
<input type="submit" value="Indítás"/>
</div>
<div class="clear"></div>
</div>
<div class="details">
<h3>
Részletek
</h3>
<ul>
<li class="name">Rendszer: <span class="value">{{m.disk.name}}</span></li>
<li class="type">Instance típus: <span class="value">{{m.instance_type.name}}</span></li>
<li class="memory">Memória: <span class="value">{{m.instance_type.RAM}} MiB</span></li>
<li class="cpu">CPU magok: <span class="value">{{m.instance_type.CPU}}</span></li>
</ul>
</div>
</form>
</li>
{% endfor %}
</ul>
</div>
<nav>
<a href="#" class="prev">&laquo; Mégse</a>
<a href="#" class="next">Tovább &raquo;</a>
<div class="clear"></div>
</nav>
<script type="text/javascript">
$(function(){
console.log('foo');
$('#modal .wm .summary').each(function(){
$(this).next('.details').show();
console.log($(this).next('.details').css('display'), $(this).next('.details').css('height'));
//this.originalHeight=parseInt($(this).next('.details').css('height'));
})
$('#modal .wm .summary').click(function(){
if($(this).next('.details').is(':hidden')){
$(this).next('.details')
.slideDown(700);
$(this).parent('.wm').addClass('opened');
} else {
var that=this;
$(this).next('.details')
.removeClass('opened')
.slideUp(700);
}
});
$('#new-template-step-2 nav .prev').click(function(){
$('#new-template-step-2').hide();
$('#new-template-step-1').show();
})
$('#new-template-step-2 nav .next').click(function(){
$('#new-template-step-2').hide();
$('#new-template-step-3').show();
$.ajax({
'type': 'POST',
'url': '/ajax/templateWizard',
'data': $('#template-wizard').serialize()
})
.done(function(){ console.log('ok')});
})
})
</script>
</div>
<div id="new-template-step-3" style="display: none">
<div id="new-template-step-3" class="wizard" style="display: none">
</div>
</form>
......@@ -73,6 +73,13 @@ def home(request):
'instances': _list_instances(request),
}))
@require_GET
@login_required
def ajax_template_wizard(request):
return render_to_response('new-template-flow.html', RequestContext(request,{
'templates': Template.objects.all(),
}))
@require_POST
@login_required
def vm_new(request, template):
......@@ -116,7 +123,7 @@ class VmPortAddView(View):
def post(self, request, iid, *args, **kwargs):
try:
public = int(request.POST['public'])
if public >= 22000 and public < 24000:
raise ValidationError("a port nem lehet 22000 es 24000 kozott")
inst = get_object_or_404(Instance, id=iid, owner=request.user)
......
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