Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interfaces and firewall throwing error if "firewall" configuration stansa has not been entered in vyos #172

Open
sliddjur opened this issue May 8, 2021 · 2 comments

Comments

@sliddjur
Copy link

sliddjur commented May 8, 2021

To reproduce:

  • install VyControl version a44f395
  • add one instance of vyos 1.3.0-rc4 that has no configuration
  • press firewall menu. it gives me this error:
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/interface/
Django Version: 3.2
Python Version: 3.9.5
Installed Applications:
['django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'accounts.apps.AccountsConfig',
 'config.apps.ConfigConfig',
 'interface.apps.InterfaceConfig',
 'firewall.apps.FirewallConfig',
 'static.apps.StaticConfig',
 'ntp.apps.NtpConfig',
 'dnsresolver.apps.DnsresolverConfig',
 'django.contrib.auth',
 'django.contrib.admin']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/code/perms.py", line 36, in wrapper_perm
    value = func(*args, **kwargs)
  File "/code/interface/views.py", line 32, in index
    firewall_all = vyos.get_firewall_all(hostname_default)
  File "/code/vyos.py", line 141, in get_firewall_all
    for f in firewall_list:
Exception Type: TypeError at /interface/
Exception Value: 'bool' object is not iterable
  • And when going to the firewall menu page I get this error.
    image

Workaround

  • Simply add set firewall in vyos and commit.

Firewall and interfaces menu options now work.

@goldeye-xor
Copy link

goldeye-xor commented Jan 5, 2022

I have the same error
On Vyos 1.4

@wessenstam
Copy link

Same error on VyOS 1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants