Re: Changing jail's IP automatically

2016-09-20 Thread Goran Tepšić
Private jail IP addresses and reverse NAT is what you need, as Konstantin said. There's no need to assign IP to jails each time you change networks just forward traffic to desired jail with PF based on localip:port and setup reverse NAT so that you get the connection from your jails. I have setup

Re: Changing jail's IP automatically

2016-09-04 Thread James Lodge
> On 4 Sep 2016, at 17:32, Grzegorz Junka wrote: > > Probably it would, I didn't try. Is this is the proper way of solving this > issue? > > >> On 03/09/2016 15:49, James Lodge wrote: >> Would PF and NAT not work for you? NAT to the WLAN0 IP (DHCP assigned) using >> PF macros and have a sep

Re: Changing jail's IP automatically

2016-09-04 Thread Dewayne Geraghty
No it doesn't require vnet. I've used this technique for years on ipfw using kernel NAT. ___ freebsd-jail@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-jail To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.

Re: Changing jail's IP automatically

2016-09-04 Thread Miroslav Lachman
Grzegorz Junka wrote on 09/04/2016 18:32: Probably it would, I didn't try. Is this is the proper way of solving this issue? If I was you I will definitely use 1:1 biNAT. Because then you can write PF rules in way without knowing the future IP assigned by DHCP. (you will use interface name, no

Re: Changing jail's IP automatically

2016-09-04 Thread Grzegorz Junka
On 03/09/2016 15:33, James Gritton wrote: On 2016-09-02 15:08, Grzegorz Junka wrote: I am using a jail on my laptop and I often connect to different WiFi's, which of course assign different IPs to my laptop. I set up the jail by adding an alias to wlan0 and I need to update the IP every time I

Re: Changing jail's IP automatically

2016-09-04 Thread Grzegorz Junka
Probably it would, I didn't try. Is this is the proper way of solving this issue? On 03/09/2016 15:49, James Lodge wrote: Would PF and NAT not work for you? NAT to the WLAN0 IP (DHCP assigned) using PF macros and have a separate subnet for your jails? This would be PAT so you might have issu

Re: Changing jail's IP automatically

2016-09-04 Thread Grzegorz Junka
On 03/09/2016 15:52, Konstantin Belousov wrote: On Sat, Sep 03, 2016 at 09:33:08AM -0600, James Gritton wrote: On 2016-09-02 15:08, Grzegorz Junka wrote: I am using a jail on my laptop and I often connect to different WiFi's, which of course assign different IPs to my laptop. I set up the jail

Re: Changing jail's IP automatically

2016-09-03 Thread James Lodge
Would PF and NAT not work for you? NAT to the WLAN0 IP (DHCP assigned) using PF macros and have a separate subnet for your jails? This would be PAT so you might have issues with accessing services inbound if you're using the same port in multiple jails. Just an idea. Sent from my iPad > O

Re: Changing jail's IP automatically

2016-09-03 Thread Isaac (.ike) Levy
sent from my mobile > On Sep 3, 2016, at 4:52 PM, Konstantin Belousov wrote: > > I use private address in the jail, and NAT it on outside interface. > This worked fine on a roaming laptop with DHCP, several years ago. Solid advice for this applied use, nat setup either 1:1 mapping or port fo

Re: Changing jail's IP automatically

2016-09-03 Thread Konstantin Belousov
On Sat, Sep 03, 2016 at 09:33:08AM -0600, James Gritton wrote: > On 2016-09-02 15:08, Grzegorz Junka wrote: > > I am using a jail on my laptop and I often connect to different > > WiFi's, which of course assign different IPs to my laptop. I set up > > the jail by adding an alias to wlan0 and I need

Re: Changing jail's IP automatically

2016-09-03 Thread James Gritton
On 2016-09-02 15:08, Grzegorz Junka wrote: I am using a jail on my laptop and I often connect to different WiFi's, which of course assign different IPs to my laptop. I set up the jail by adding an alias to wlan0 and I need to update the IP every time I switch the WiFi network. Is it possible to c

Changing jail's IP automatically

2016-09-02 Thread Grzegorz Junka
I am using a jail on my laptop and I often connect to different WiFi's, which of course assign different IPs to my laptop. I set up the jail by adding an alias to wlan0 and I need to update the IP every time I switch the WiFi network. Is it possible to create a jail with IP assigned dynamically