summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/nat_vlc
diff options
context:
space:
mode:
authorgasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-01-20 06:51:53 +0000
committergasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-01-20 06:51:53 +0000
commitccddccc70d213c797cc5bd89fece64ecf196819c (patch)
tree0d9efd2f234c1bd275a5c10adf2d1a0234f517c7 /kpov_judge/tasks/nat_vlc
parent9a4a0fc127db7d81aacf297c3e2cfbdb1fbc2817 (diff)
fixed indent in radius_mysql_pam/task.py
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@214 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks/nat_vlc')
-rw-r--r--kpov_judge/tasks/nat_vlc/task.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/kpov_judge/tasks/nat_vlc/task.py b/kpov_judge/tasks/nat_vlc/task.py
index fae3be5..b595961 100644
--- a/kpov_judge/tasks/nat_vlc/task.py
+++ b/kpov_judge/tasks/nat_vlc/task.py
@@ -12,9 +12,8 @@ instructions = {
'si':u"""
Postavi dva navidezna računalnika - SimpleArbiter z diskom simpleArbiter
ter NATServer. NATServer naj ima dva omrežna vmesnika - z enim naj bo povezan
-na simpleArbiter, z drugim pa na Internet. Na NATServer z ukazom ifconfig in z datoteko /etc/network/interfaces skonfiguriraj omrene
-vmesnike tako da bo en vmesnik povezan v WAN (Internet) in en vmesnik na LAN (simpleArbiter). SimpleArbiter skonfiguriraj tako, da
-bo za privzeti prehod uporabljal NATServer. Nastavi DNS (etc/resolv.conf). e e ni, omogoi posredovanje IP naslovov. Nastavi NAT
+na simpleArbiter, z drugim pa na Internet. Na NATServer z ukazom ifconfig in z datoteko /etc/network/interfaces skonfiguriraj omrežne vmesnike tako da bo en vmesnik povezan v WAN (Internet) in en vmesnik na LAN (simpleArbiter). SimpleArbiter skonfiguriraj tako, da
+bo za privzeti prehod uporabljal NATServer. Nastavi DNS (etc/resolv.conf). če še ni, omogoči posredovanje IP naslovov. Nastavi NAT
z uporabo paketa iptables. Na simpleArbiter z vlc preberi naslov, na katerem si lahko ogledaš kratek filmček.
""",
'en':u"""
@@ -76,7 +75,7 @@ params_meta = {
# 'IP_NM': {'descriptions': {'si': 'Naslov maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True},
# 'DNS_NM': {'descriptions': {'si': 'DNS za maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True},
'IP_simple': {'descriptions': {'si': 'Naslov SimpleArbiter'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True},
- 'IP_NAT': {'descriptions': {'si': 'Naslov NAT'} 'w': False, 'public': True, 'type': 'IP', 'generated': True },
+ 'IP_NAT': {'descriptions': {'si': 'Naslov NAT'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True },
# 'DNS_static': {'descriptions': {'si': 'DNS za maliBrezNetworkManager'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True},
}
@@ -107,11 +106,11 @@ def gen_params(user_id, params_meta):
r = random.Random(user_id)
# IP_NM, DNS_NM, IP_static, DNS_static)
# dns_servers = ['193.2.1.66', '193.2.1.72', '8.8.8.8', '8.8.4.4', '208.67.222.222', '208.67.220.220']
- net = kpov_random_helpers.IPv4_net_gen(r, 254, true, false)
+ net = kpov_random_helpers.IPv4_net_gen(r, 253, True, False)
# params['DNS_NM'] = r.choice(dns_servers)
- params['IP_NAT'] = net
+ params['IP_NAT'], params['IP_simple'] = kpov_random_helpers.IPv4_addr_gen(r, net, 2)
# params['IP_NM']
- params['IP_simple'] = kpov_random_helpers.IPv4_addr_gen(r, net, 1)
+ # params['IP_simple'] = kpov_random_helpers.IPv4_addr_gen(r, net, 1)
# params['DNS_static'] = r.choice(dns_servers)
return params