PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Mocks 0.0.2 Configfile Problem



G.U.N
14.07.2010, 21:11
Hi Leute ich versuche mich nun seit gut 10 Stunden an der User Authentifikation von Mocks leider erfolglos, der Server geht bisher super aber halt ohne Abfrage von User/Passwort das würde ich gerne ändern.

http://debianforum.de/forum/images/smilies/icon_google.gif bringt mich leider immer auf nicht gerade hilfreiche Seiten.

Meine .conf sieht so aus

Code: #################################################
# #
# Sample configuration file for MOCKS 0.0.2 #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# #
# I recommend reading the examples in this file #
# and then extending it to suite your needs. #
# #
#################################################



#########################
#
# General daemon config
# ~~~~~~~~~~~~~~~~~~~~~
#
#########################

PORT = XX(Angepasst)XX # Port MOCKS is to listen to
MOCKS_ADDR = XX(ServerIP Angepasst)XX # IP adress MOCKS is to bind to
LOG_FILE = mocks.log # MOCKS log file
PID_FILE = mocks.pid # File holding MOCKS's process ID
BUFFER_SIZE = 65536 # Traffic buffer size in bytes
BACKLOG = 5 # Backlog for listen()
NEGOTIATION_TIMEOUT = 5
CONNECTION_IDLE_TIMEOUT = 300
BIND_TIMEOUT = 30
SHUTDOWN_TIMEOUT = 3
MAX_CONNECTIONS = 50


################################################## ########################
#
# Client filter config
# ~~~~~~~~~~~~~~~~~~~~
#
# Client filtering means sorting out which clients are allowed
# connection and which are not. This is basically done like this:
# MOCKS has a default behaviour regarding filtering client
# connections. This behaviour is called the 'policy' and can either
# be to ALLOW or to DENY the connection. After setting the policy
# you can specify a list of exceptions. The action MOCKS takes
# for a client matching any of these exceptions is the opposite
# of the policy (that is, if the policy is set to ALLOW the exceptions
# are denied and if the policy is set to DENY the exceptions are allowed).
# An exception is specified in the form ip_address/mask, where mask
# is optional and is an integer ranging from 0 to 32 identifying the
# number of common heading bits that ip_address and the client's IP
# address must have in order to yield a match. If mask is missing,
# 32 will be assumed. For instance, 192.168.1.0/24 will match any IP
# ranging from 192.168.1.1 to 192.168.1.255.
#
# Let's take two examples, one for each type of policy. Let's say we
# only want to allow IPs 10.12.0.0 through 10.12.255.255, 172.23.2.5 and
# 192.168.52.26 to use MOCKS. What we have to to is this:
#
# FILTER_POLICY = DENY
# FILTER_EXCEPTION = 10.12.0.0/16
# FILTER_EXCEPTION = 172.23.2.5 # implied /32
# FILTER_EXCEPTION = 192.168.52.26 # implied /32
#
# Now, let's say this is a public proxy server, but for some reason
# you don't want to let any IP ranging from 192.168.1.1 to 192.168.1.255
# and neither 10.2.5.13 to connect to it:
#
# FILTER_POLICY = ALLOW
# FILTER_EXCEPTION = 192.168.1.0/24
# FILTER_EXCEPTION = 10.2.5.13
#
################################################## #########################

FILTER_POLICY = ALLOW



################################################## ###########################
#
# Upstream proxy config
# ~~~~~~~~~~~~~~~~~~~~~
#
# You can choose to further relay traffic through another proxy server.
# MOCKS supports upstream HTTP CONNECT, SOCKS4 and SOCKS5 proxies. You
# must specify the proxy type (one of HTTPCONNECT, SOCKS4 or SOCKS5), the
# proxy address and the proxy port. Optionally you can specify an user
# name and a password used to authenicate to the upstream proxy. This is
# pretty straight forward, so let's just take an example. Let's say you
# want to use the HTTP CONNECT server at httpconnectproxy.com, on port 3128,
# using the username 'foo' and the password 'bar'. You do it like this:
#
# UP_PROXY_TYPE = HTTPCONNECT
# UP_PROXY_ADDR = httpconnectproxy.com
# UP_PROXY_PORT = 3128
# UP_PROXY_USER = test # These two can be missing if you
# UP_PROXY_PASSWD = test # are not required to authenticate
#
################################################## ###########################

# UP_PROXY_TYPE = HTTPCONNECT
# UP_PROXY_ADDR = 192.168.1.12
# UP_PROXY_PORT = 3128




Ich hoffe Ihr könnt mir nen Stoß in die richtige richtung geben. http://debianforum.de/forum/images/smilies/icon_redface.gif

Grüße

hAgBaRd2ooo
14.07.2010, 21:15
So müsste es funktionieren ;)

#################################################
# #
# Sample configuration file for MOCKS 0.0.2 #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# #
# I recommend reading the examples in this file #
# and then extending it to suite your needs. #
# #
#################################################



#########################
#
# General daemon config
# ~~~~~~~~~~~~~~~~~~~~~
#
#########################

PORT = XX(Angepasst)XX # Port MOCKS is to listen to
MOCKS_ADDR = XX(ServerIP Angepasst)XX # IP adress MOCKS is to bind to
LOG_FILE = mocks.log # MOCKS log file
PID_FILE = mocks.pid # File holding MOCKS's process ID
BUFFER_SIZE = 65536 # Traffic buffer size in bytes
BACKLOG = 5 # Backlog for listen()
NEGOTIATION_TIMEOUT = 5
CONNECTION_IDLE_TIMEOUT = 300
BIND_TIMEOUT = 30
SHUTDOWN_TIMEOUT = 3
MAX_CONNECTIONS = 50


################################################## ########################
#
# Client filter config
# ~~~~~~~~~~~~~~~~~~~~
#
# Client filtering means sorting out which clients are allowed
# connection and which are not. This is basically done like this:
# MOCKS has a default behaviour regarding filtering client
# connections. This behaviour is called the 'policy' and can either
# be to ALLOW or to DENY the connection. After setting the policy
# you can specify a list of exceptions. The action MOCKS takes
# for a client matching any of these exceptions is the opposite
# of the policy (that is, if the policy is set to ALLOW the exceptions
# are denied and if the policy is set to DENY the exceptions are allowed).
# An exception is specified in the form ip_address/mask, where mask
# is optional and is an integer ranging from 0 to 32 identifying the
# number of common heading bits that ip_address and the client's IP
# address must have in order to yield a match. If mask is missing,
# 32 will be assumed. For instance, 192.168.1.0/24 will match any IP
# ranging from 192.168.1.1 to 192.168.1.255.
#
# Let's take two examples, one for each type of policy. Let's say we
# only want to allow IPs 10.12.0.0 through 10.12.255.255, 172.23.2.5 and
# 192.168.52.26 to use MOCKS. What we have to to is this:
#
# FILTER_POLICY = DENY
# FILTER_EXCEPTION = 10.12.0.0/16
# FILTER_EXCEPTION = 172.23.2.5 # implied /32
# FILTER_EXCEPTION = 192.168.52.26 # implied /32
#
# Now, let's say this is a public proxy server, but for some reason
# you don't want to let any IP ranging from 192.168.1.1 to 192.168.1.255
# and neither 10.2.5.13 to connect to it:
#
# FILTER_POLICY = ALLOW
# FILTER_EXCEPTION = 192.168.1.0/24
# FILTER_EXCEPTION = 10.2.5.13
#
################################################## #########################

FILTER_POLICY = ALLOW



################################################## ###########################
#
# Upstream proxy config
# ~~~~~~~~~~~~~~~~~~~~~
#
# You can choose to further relay traffic through another proxy server.
# MOCKS supports upstream HTTP CONNECT, SOCKS4 and SOCKS5 proxies. You
# must specify the proxy type (one of HTTPCONNECT, SOCKS4 or SOCKS5), the
# proxy address and the proxy port. Optionally you can specify an user
# name and a password used to authenicate to the upstream proxy. This is
# pretty straight forward, so let's just take an example. Let's say you
# want to use the HTTP CONNECT server at httpconnectproxy.com, on port 3128,
# using the username 'foo' and the password 'bar'. You do it like this:
#
# UP_PROXY_TYPE = HTTPCONNECT
# UP_PROXY_ADDR = httpconnectproxy.com
# UP_PROXY_PORT = 3128
# UP_PROXY_USER = test # These two can be missing if you
# UP_PROXY_PASSWD = test # are not required to authenticate
#
################################################## ###########################

UP_PROXY_TYPE = HTTPCONNECT
UP_PROXY_ADDR = Server-IP
UP_PROXY_PORT = Server-Port
UP_PROXY_USER = Benutzername
UP_PROXY_PASSWD = Passwort

G.U.N
14.07.2010, 21:45
Hab mal das befolgt was du geändert hast aber:


[43:28] Testing Started.
Proxy Server
Address: XX:XX
Protocol: SOCKS 5
Authentication: YES
Username: test

[43:28] Starting: Test 1: Connection to the Proxy Server
[43:28] IP Address: XX
[43:28] Connection established
[43:28] Test passed.
[43:28] Starting: Test 2: Connection through the Proxy Server
[43:28] Error : the proxy server uses unsupported methods.
[43:28] Test failed.
[43:28] Testing Finished.

Muss bei UP_PROXY_TYPE wirklich HTTPCONNECT oder kann ich da auch SOCKS5 Schreiben hab leider keine Mainpage zu Mocks gefunden und die Links zu der gepachten Version sind alle down.

hAgBaRd2ooo
14.07.2010, 21:47
Oh :D auf den Type hatte ich jetzt gar nicht geachtet :D

Mach mal SOCKS5 und schreib dann nochmal hier obs geht oder nicht :)

G.U.N
14.07.2010, 21:51
Fast das selbe wie vorher:

50:11] Starting: Test 2: Connection through the Proxy Server
[50:11] Error : the proxy server uses unsupported methods.
[50:11] Test failed.
[50:11] Testing Finished.

Und in der Conf steht jetzt halt UP_PROXY_TYPE = SOCKS5

Vermutung von mir:

Oben in

PORT = XX # Port MOCKS is to listen to
MOCKS_ADDR = XX # IP adress MOCKS is to bind to

& unten

UP_PROXY_TYPE = SOCKS5
UP_PROXY_ADDR = xx
UP_PROXY_PORT = xx
UP_PROXY_USER = test
UP_PROXY_PASSWD = test

Sind die IP & der Port gleich kann es dran liegen?

Grüße & danke für die Hilfe

hAgBaRd2ooo
14.07.2010, 21:57
Also da muss bei beiden die gleiche IP und Port rein !

G.U.N
14.07.2010, 22:38
Ok diese sind gleich, so ein scheis, wie war das mocks ist einfach.

Hast du noch eine Idee an was es liegen kann also TUN & TAP sind auch an - bzw der Socks läuft Super ohne User & Passwort abfrage.

OK mit Mocks in Version 0.0.2 ist keine User / PW abfrage gegeben dafür kussiert eine gepachte Version die ich leider nicht gefunden habe, schade. Sollte sie mal wer finden oder haben kann er sich gerne bei mir melden.

Das Thema kann geschlossen werden. Danke hAgBaRd2ooo auf für den netten ICQ Talk

---------------------------------------------------- CLOSE -------------------------------------------