A web server behind two gateways?

2017-07-16 Thread Grzegorz Junka
Hello, I have a jail running a web server in LAN. There are two routers/WANs that can connect LAN to the internet. I enabled NAT and port forwarding to the web server on both routers. The problem is that the web server responds to requests only from one router at a time depending on the defa

Re: A web server behind two gateways?

2017-07-17 Thread Eugene Grosbein
On 16.07.2017 19:48, Grzegorz Junka wrote: > Hello, > > I have a jail running a web server in LAN. There are two routers/WANs > that can connect LAN to the internet. I enabled NAT and port forwarding > to the web server on both routers. > > The problem is that the web server responds to request

Re: A web server behind two gateways?

2017-07-17 Thread Alan Somers
On Mon, Jul 17, 2017 at 5:33 AM, Eugene Grosbein wrote: > On 16.07.2017 19:48, Grzegorz Junka wrote: >> Hello, >> >> I have a jail running a web server in LAN. There are two routers/WANs >> that can connect LAN to the internet. I enabled NAT and port forwarding >> to the web server on both routers

Re: A web server behind two gateways?

2017-07-17 Thread Sami Halabi
Hi, simple solution i can think about is: 1. launch 1st jail apache/nginx with db (mysql?) ve sure to use mysql address accesible vian jail2 (maybe epair), this jail will use default route, lets say wan1. 2. launch 2nd jail with vnet, default route wan2, mount the same data directories as jail1, an

Re: A web server behind two gateways?

2017-07-17 Thread Eugene Grosbein
17.07.2017 23:46, Alan Somers wrote: >> So, the solution depends of kind of NAT you use. > > That's not 100% true. The web server is choosing which gateway to > use. As Grzegorz said, it's only configured to use a single gateway > at a time. To do what Grzegorz wants, he'll need to use multipl

Re: A web server behind two gateways?

2017-07-17 Thread Kurt Jaeger
Hi! > I have a jail running a web server in LAN. There are two routers/WANs > that can connect LAN to the internet. I enabled NAT and port forwarding > to the web server on both routers. [...] > Can I configure either router/host/jail so that the web server sends the > response back to the IP t

Re: A web server behind two gateways?

2017-07-17 Thread Eugene Grosbein
18.07.2017 0:26, Kurt Jaeger wrote: > I have a vague idea: > > If you set a tag (or a keep-state :flowname) using a ipfw rule that matches > the incoming gateway MAC and match that tag/check-state flowname and > the connection (keep-state) to fwd the answer packet back to that gateway ? In fact,

Re: A web server behind two gateways?

2017-07-17 Thread Alan Somers
On Mon, Jul 17, 2017 at 11:19 AM, Eugene Grosbein wrote: > 17.07.2017 23:46, Alan Somers wrote: > >>> So, the solution depends of kind of NAT you use. >> >> That's not 100% true. The web server is choosing which gateway to >> use. As Grzegorz said, it's only configured to use a single gateway >>

Re: A web server behind two gateways?

2017-07-17 Thread Eugene Grosbein
18.07.2017 0:48, Alan Somers wrote: > I think what you meant to say is "this will work for a server directly > connected to two external gateways (whether or not NAT is involved), > but won't work if the server is not on the same subnet as the > gateways". That's true. But judging by the OP, I t

Re: A web server behind two gateways?

2017-07-17 Thread brahmann
Hi, you can use(if itsobe server with two uplinks) ipfw probe 0,5, two separate flows for two fibs, with some two flowfib script. I did that once and work like a charm. Wbr, brahmann 17 липня 2017 р. 20:33:47 GMT+03:00, Eugene Grosbein написав: >18.07.2017 0:26, Kurt Jaeger wrote: > >> I h

Re: A web server behind two gateways?

2017-07-17 Thread Eugene Grosbein
18.07.2017 1:19, Eugene Grosbein пишет: > 18.07.2017 0:48, Alan Somers wrote: > >> I think what you meant to say is "this will work for a server directly >> connected to two external gateways (whether or not NAT is involved), >> but won't work if the server is not on the same subnet as the >> gate

Re: A web server behind two gateways?

2017-07-17 Thread Grzegorz Junka
On 17/07/2017 18:22, Eugene Grosbein wrote: 18.07.2017 1:19, Eugene Grosbein пишет: 18.07.2017 0:48, Alan Somers wrote: Not answering any particular email in this thread, many thanks for your help. That;s plenty of ideas to try so may take some time! Just one more question, since VNET wa

Re: A web server behind two gateways?

2017-07-19 Thread Julian Elischer
On 18/7/17 11:50 am, Grzegorz Junka wrote: On 17/07/2017 18:22, Eugene Grosbein wrote: 18.07.2017 1:19, Eugene Grosbein пишет: 18.07.2017 0:48, Alan Somers wrote: Not answering any particular email in this thread, many thanks for your help. That;s plenty of ideas to try so may take some t