OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Profile of FriendOfCarlotta »
  • Show Posts »
  • Topics
  • Profile Info
    • Summary
    • Show Stats
    • Show Posts...
      • Messages
      • Topics
      • Attachments

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

  • Messages
  • Topics
  • Attachments

Topics - FriendOfCarlotta

Pages: [1]
1
German - Deutsch / [SOLVED] Route via Api erstellen
« on: May 18, 2018, 03:19:04 pm »
Hallo!

Ich möchte eine Route via Api mit Python 3 und requests erstellen:

Code: [Select]
apikey = 'xxx'
apisecret = 'xxx'
url = 'https://10.0.0.254/api/routes/routes/addroute'
requests.post(url, data=payload, verify=None, auth=(apikey, apisecret))

Payload sieht so aus:
Code: [Select]
{'route': {'network': '10.0.50.0/24', 'gateway': {'Null4': {'value': 'Null4 - 127.0.0.1', 'selected': 0}, 'Null6': {'value': 'Null6 - ::1', 'selected': 0}, 'VLAN_GW': {'value': 'VLAN_GW - 10.0.0.253', 'selected': 1}, 'WAN_DHCP': {'value': 'WAN_DHCP - 192.168.107.2', 'selected': 0}}, 'descr': 'vlan50', 'disabled': '0'}}

Der Post-Request liefert diese Fehlermeldung zurück:
Code: [Select]
{"errorMessage":"Error at /usr/local/opnsense/mvc/app/models/OPNsense/Routes/Route.php:59 - Undefined index:  (errno=8)"}

Andererseits kann ich via
Code: [Select]
/api/routes/routes/setroute/<uuid> mit dem identischen Payload eine existierende Route erfolgreich ändern.

Payload basiert auf dem, was
Code: [Select]
/api/routes/routes/getroute ohne uuid zurückliefert.

Was läuft hier falsch?

Viele Grüße, Thomas

2
Development and Code Review / [SOLVED] Add route via api
« on: May 18, 2018, 12:57:23 pm »
Hello!

I try to add a new route via the api using Python 3 and requests:

Code: [Select]
apikey = 'xxx'
apisecret = 'xxx'
url = 'https://10.0.0.254/api/routes/routes/addroute'
requests.post(url, data=payload, verify=None, auth=(apikey, apisecret))

payload is
Code: [Select]
{'route': {'network': '10.0.50.0/24', 'gateway': {'Null4': {'value': 'Null4 - 127.0.0.1', 'selected': 0}, 'Null6': {'value': 'Null6 - ::1', 'selected': 0}, 'VLAN_GW': {'value': 'VLAN_GW - 10.0.0.253', 'selected': 1}, 'WAN_DHCP': {'value': 'WAN_DHCP - 192.168.107.2', 'selected': 0}}, 'descr': 'vlan50', 'disabled': '0'}}

As result I receive:
Code: [Select]
{"errorMessage":"Error at /usr/local/opnsense/mvc/app/models/OPNsense/Routes/Route.php:59 - Undefined index:  (errno=8)"}

On the other side I am able to change an existing route via
Code: [Select]
/api/routes/routes/setroute/<uuid> with the same payload.

The payload has been received with
Code: [Select]
getroute and was modified accordingly.

Any hints are appreciated.

Regards, Thomas

3
17.7 Legacy Series / [SOLVED] proxy authentication against a Samba 4 AD
« on: August 10, 2017, 03:30:31 pm »
Hello!

Does proxy authentication against a samba 4 AD work at least?

I have successfully set up the LDAP access on a 17.7 test system:
* imported ca.pem of the samba server.
* port 636 and ssl configured.
* bind credentials work.
* authentication container queried and selected.
* servername of the AD server is resolvable via DNS.
* AD users can be successfully authenticated with  System | Access | Tester.

So far so good. But if I try to log in on the proxy with the client browser I get a loop. After the user data has been entered, the empty login dialog appears again and again.
The system log file shows:
Squid: LDAP bind error (Can not contact LDAP server)
Squid: user 'username' could not authenticate.

Why can squid not query the AD, but the OPNsense web interface very well?

Regards, Thomas

4
German - Deutsch / [SOLVED] Proxy-Authentifizierung gegen Samba 4 AD
« on: August 10, 2017, 03:23:31 pm »
Hallo!

Funktioniert die Proxy-Authentifizierung gegen einen Samba 4 AD grundsätzlich?

Ich habe hier auf einem 17.7-Testsystem den Zugangsserver vom Typ LDAP erfolgreich eingerichtet:
* ca.pem des Samba-Servers importiert.
* Port 636 und SSL konfiguriert.
* Bind-Zugangsdaten eingetragen.
* Authentifizierungscontainer abgefragt und ausgewählt.
* servername des AD-Servers ist per DNS auflösbar.
* AD-User lassen sich unter System|Zugang|Prüfer erfolgreich authentifizieren.

Soweit so gut. Aber auf einem Client-Browser lande ich beim Anmelden auf dem Proxy in einer Schleife. Nach dem Eintragen der Userdaten erscheint wieder der leere Anmeldedialog.
Die System-Logdatei zeigt:
squid: LDAP bind error (Can't contact LDAP server)
squid: user 'username' could not authenticate.

Warum kann squid den LDAP nicht abfragen, das OPNsense-Webinterface aber sehr wohl?

Grüße, Thomas

Pages: [1]
OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2