Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Tor Anonymizing Middlebox mit PFsene

    Scheduled Pinned Locked Moved Deutsch
    2 Posts 1 Posters 1.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Luegenbaron
      last edited by

      Hallo zusammen

      Absicht: Ich möchte gerne ein Offenes Wlan der allgemeinheit zur verfügung stellen. Dieses jedoch durch das Tor-Netzwerk leiten.
      Jetzt habe ich ein Interface (DMZMulti) in welchem ich meine TorRelays habe und ein Interface (OpenTOr) an welchem der AP hängt.

      Nun habe ich das ganze so eingerichtet: https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy
      siehe Anonymizing Middlebox

      Nun leite ich alle DNS anfragen im OpenTor Net auf das TorRelay mittels Portforwarding um.
      Das funktioniert schon mal.

      Nun möchte ich alle Http und Https anfragen im OpenTor-Net auf auf das TorRelay umleiten.
      Dies habe ich mittels Portforwarding auch schon mal gemacht.

      Jedoch meldet mir das TorRelay nun in den Logs:
      Apr 13 11:21:31.000 [warn] getsockopt() failed: Protocol not available
      Apr 13 11:21:31.000 [warn] Fetching original destination failed. Closing.

      Ich nehme an das hängt mit dem hier besprochenen zusammen:https://lists.torproject.org/pipermail/tor-talk/2012-April/024046.html

      Nun komme ich aber nicht weiter wie ich das auf der PFsense lösen kann/muss:
      Vermute ich muss diese iptables regeln auf die PFsense um müntzen weiss aber nicht wie.
      iptables -t nat -A PREROUTING -i $_int_if -p tcp –syn -j REDIRECT --to-ports $_trans_port

      Danke euch für eure Zeit

      Luegenbaron

      1 Reply Last reply Reply Quote 0
      • L
        Luegenbaron
        last edited by

        Hallo zusammen

        Leider konnte mir bisher niemand weiterhelfen. Da ich noch etwas weiter gesucht habe fand ich dass hier auf:
        https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy#BSDPF

        To enable the transparent proxy and the DNS proxy, add the following to your torrc.

        VirtualAddrNetworkIPv4 10.192.0.0/10
        AutomapHostsOnResolve 1
        TransPort 9040
        DNSPort 53

        Use the PF ruleset below as an example for FreeBSD and OpenBSD prior to 4.7.

        your internal interface

        int_if = "fxp0"

        Tor's TransPort

        trans_port = "9040"

        set skip on lo

        scrub in

        rdr pass on $int_if inet proto tcp to !($int_if) -> 127.0.0.1 port $trans_port
        rdr pass on $int_if inet proto udp to port domain -> 127.0.0.1 port domain

        Use the PF ruleset below as an example for OpenBSD 4.7 and later.

        your internal interface

        int_if = "fxp0"

        Tor's TransPort

        trans_port = "9040"

        set skip on lo

        match in all scrub (no-df random-id)

        pass in quick on $int_if inet proto tcp to !($int_if) rdr-to 127.0.0.1 port $trans_port
        pass in quick on $int_if inet proto udp to port domain rdr-to 127.0.0.1 port domain

        Nun bin ich mir aber nicht sicher welches Regelset ich brauche? Vor 4.7 oder nach 4.7. Da beim nach 4.7 nichts mehr über FreeBSD steht.

        Und wie, wo krieg ich die Regel in die PFsense.

        Danke euch für eure Antworten

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.