1
15.7 Legacy Series / [SOLVED] Binding an internal machines traffic to a specific external IP
« on: July 27, 2015, 06:06:43 pm »
Hello everbody!
My name is Oliver and i'm new here and new to the OPNsense platform.
I used alot of different routers over the years, but had settled for one of the bigger players. They use all closed software on their hardware platform, but i've to admit, these was extremely optimized/responsive.
I want to change! And maybe you could help.
My setup uses the latest updates (15.7.4) on APU1D4 board (AMD, 64 bit).
All basic stuff does work so far. Establishing an internet connection, using NAT rules, etc. But i've encountered one problem with my Multi-WAN Setup. This is my setup right now:
LAN (re0): 192.168.0.x (IP v4, DHCP is provided by Server)
WAN1 (re1): ADSL / PPPoE (IP v4, DHCP from Provider) = default gateway
WAN2 (re2): SDSL / Static (IP v4, 8 addresses IP block)
Several different machines on the LAN all use the WAN1 (default) interface for internet connection. One machine is a server for a very small hosting environment. This server should use the WAN2 interface for it's traffic.
Traffic originating from the Internet and targeting the server (via one dedicated IP out of the pool) works fine via NAT rule:
Internet -> SDSL/IP -> OPNsense (via WAN2) -> NAT -> Server (LAN) = OK
But vice versa doesn't work and looks right now like this:
Server (LAN) -> NAT -> OPNsense (via WAN1) -> Internet = WRONG
I tried alot of possible configurations, but couldn't get it to work properly. Found several how-to's with hints like using a Virtual IP and also setting up outbound NAT rule generation in specific ways, but it didn't work out. I'm sure, OPNsense can do that, maybe someone can point me in the right direction.
Anybody did a setup like this? And likes to share how it needs to be set up?
Thanks alot.
My name is Oliver and i'm new here and new to the OPNsense platform.
I used alot of different routers over the years, but had settled for one of the bigger players. They use all closed software on their hardware platform, but i've to admit, these was extremely optimized/responsive.
I want to change! And maybe you could help.
My setup uses the latest updates (15.7.4) on APU1D4 board (AMD, 64 bit).
All basic stuff does work so far. Establishing an internet connection, using NAT rules, etc. But i've encountered one problem with my Multi-WAN Setup. This is my setup right now:
LAN (re0): 192.168.0.x (IP v4, DHCP is provided by Server)
WAN1 (re1): ADSL / PPPoE (IP v4, DHCP from Provider) = default gateway
WAN2 (re2): SDSL / Static (IP v4, 8 addresses IP block)
Several different machines on the LAN all use the WAN1 (default) interface for internet connection. One machine is a server for a very small hosting environment. This server should use the WAN2 interface for it's traffic.
Traffic originating from the Internet and targeting the server (via one dedicated IP out of the pool) works fine via NAT rule:
Internet -> SDSL/IP -> OPNsense (via WAN2) -> NAT -> Server (LAN) = OK
But vice versa doesn't work and looks right now like this:
Server (LAN) -> NAT -> OPNsense (via WAN1) -> Internet = WRONG
I tried alot of possible configurations, but couldn't get it to work properly. Found several how-to's with hints like using a Virtual IP and also setting up outbound NAT rule generation in specific ways, but it didn't work out. I'm sure, OPNsense can do that, maybe someone can point me in the right direction.
Anybody did a setup like this? And likes to share how it needs to be set up?
Thanks alot.