OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Profile of PhreakShow »
  • 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 - PhreakShow

Pages: [1]
1
23.7 Legacy Series / MultiWAN: Force traffic from firewall itself to specific gateway
« on: December 08, 2023, 01:42:10 am »
Hi guys.

I am using opnsense 23.7.9 with two ISPs and two WAN interfaces. I want to use WAN1 to update my dyndns address, never WAN2.

So that's what I did to achieve that:

ddclient is using api.ipify.org to determine my IP, and uses the default gateway for that (which is the wrong one, WAN2).

I created an alias for api.ipify.org, created a floating fw rule, source "this firewall", destination alias, ipv4, any port, no specific interface selected, and then set the gateway to WAN1.

As soon as I enable this rule, curl -s https://api.ipify.org fails and never returns an address. If I disable the rule, it returns the IP from the wrong WAN interface.

As a sanity check I created a LAN rule, outgoing, from any host in my LAN, destination again the alias. If I run Invoke-RestMethod -Uri 'https://api.ipify.org?format=json' on a windows machine in my LAN, it uses the correct gateway and returns the correct address. As soon as I disable the run, it returns the wrong one.
So in my LAN case, it works as expected.

How can I make this work for traffic from the opnsense itself? For testing I even set the destination to any, routing all the traffic from opnsense over that specific gateway. As soon as I enabled that, even pings to 8.8.8.8 timed out.

What did I do wrong here?

2
Virtual private networks / Two WAN gateways, one for incoming VPNs and one for the rest
« on: November 28, 2023, 02:11:45 am »
Hi.

I recently got a second isp that provides internet over fibre. I also have a copper vdsl connection, both work fine.
The fibre offers 1gbit/s, copper is limited to 250mb/s but comes with a public ipv4 address, which the fibre network does not offer, only nat.

I need the public v4 address to access my network while I'm away, using opnsene's openvpn.
openvpn is configured and working fine.

Right now I am using just the vdsl connection for everything, using WAN. I want to configure a second interface and call it WAN2.

So the goal is: Configure opnsense to accept vpn connections over WAN, and use WAN2 for all the other traffic.

How do I do that? The tutorials or rather the documentation mentions failover or load balancing, but I want neither.

3
German - Deutsch / OPNsense soll traffic zwischen zwei WANs teilen
« on: January 13, 2018, 11:48:55 pm »
Hi zusammen.

Ich habe folgendes vor: Im Moment habe ich Kabel D/vodafone, aber das Segment ist überbucht und in den Abendstunden kann ich nichts vernünftig spielen (ping > 500ms). Ich habe eine 20GB congstar LTE SIM, über die der "Zocktraffic" laufen soll.

OPNsense ist auf einem Atom n270 installiert, mit drei NICs. NIC1 ist WAN, NIC2 ist LAN und NIC3 heißt LTE.

Am LTE-Anschluss hängt mein Notebook mit eingestecktem LTE-Stick. Das Notebook bridged den LTE-Stick auf das gleiche Netz wie am LTE-Anschluss konfiguriert ist. Das funktioniert soweit und ist eine Zwischenlösung, bis mein richtiges LTE-Modem kommt.

In der Firewall habe ich eine Regel definiert, nach der sämtlicher UDP-Traffic zwischen 7000 und 7999 das LTE-Gateway nehmen soll. Das funktioniert ebenfalls. Das habe ich aus dem Thread:

https://forum.opnsense.org/index.php?topic=6776.0

Der hat ja ein ähnliches Thema.

Aber mein Problem geht weiter. Der Spieleserver schickt mir ja ebenfalls UDP-Pakete. Die müssen auch durch die LTE-Verbindung, sonst habe ich ja nichts davon. Aber woher weiß der Server, wo er hinfeuern muss.
Wie kommen die Pakete überhaupt bei meinem Client an? In meinem Router gibt es ja keinen Portforward auf meinen Rechner. Der Router muss also wissen, dass er da eingehenden Traffic durch das NAT zu meinem Rechner schiebt. Das heißt für mich, dass es einen Bezug zu den zuerst ausgehenden Paketen geben muss, weil mein Rechner die Verbindung startet.

Die ausgehenden Ports auf meinem Rechner sind zufällig gewählt. Das macht nix, weil ich den Zielport für den ausgehenden UDP-Traffic kenne. Aber wie mach ich das mit dem Rückweg?

4
General Discussion / [SOLVED]: Cascading two routers: incoming port forwards not working
« on: January 13, 2018, 03:40:20 am »
Hey guys,

I am trying to get a setup with two routers working. I have an existing OpenWRT router, with a cable modem connected. The problem is, my ISP sucks and I want to have a second WAN for load balancing. I also do not want to alter my existing existing network while testing.

That's why I put a OPNsense with a triple NIC "in front". So the setup looks like this:

internet - OPN (192.168.10.1)

(192.168.10.2) - WRT - (192.168.1.1)

Atm this only works for outgoing traffic. But I want to have at least incoming 443 and 3389 redirected to 192.168.1.2, which is in my original network.

Until now I was of the opinion, that I have to set up the redirect twice. In OPNsense from WAN to 192.168.10.2, and on the OpenWRT box from WAN to 192.168.1.2. But it is not working.

How do I do this properly?



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