Re: ipfw3 nat to dynamic ip

2021-12-24 Thread samg
On Fri, Dec 24, 2021, at 10:05 AM, Edgar Pettijohn wrote:
> From the manual:
>
> [ifX*:net*]
>  Matches the IPv4 network of the first IPv4 address
>  assigned to the *ifX*.  It is intended to help matching 
> the
>  IPv4 network of the IPv4 address assigned to the *ifX*
>  dynamically, e.g. by DHCP.

Thats from the ipfw manual, not the ipfw3 manual. ipfw3 doesn't support that 
syntax in the nat config. Looking at the source, it parses the ip with 
inet_aton, which only accepts ips in the form xxx.xxx[.xxx[.xxx]]


Re: ipfw3 nat to dynamic ip

2021-12-24 Thread samg
The network looks like this:
WAN - [ ISP Router ] -- [ My Router ]  [ My Clients ]
The ISP router is set for IP passthrough, so 1-1 NAT. I don't have a static IP 
address, the ISP router gets an IP from the ISP via dhcp. So on my router, eth0 
is connected to the ISP router, and gets an ip via dhcp, which will be whatever 
ip the isp router got, and this ip can change from time to time. I'd like to 
NAT traffic out via eth0, or whatever ip eth0 happens to have at the time.

An aside: does ipfw3 support ipv6 ip's?

Thanks,
Sam

On Fri, Dec 24, 2021, at 5:54 AM, Bill Yuan wrote:
> Hi,
>
> Yes, Currently, it supports IP address only.
> What do you mean by "Dynamic IP address"? 
> Do you mean NAT to iface instead of IP address during the configuration?
> Or can you please help to elaborate?
>
> Regards,
> Bill Yuan
>
> On Fri, 24 Dec 2021 at 07:43, samg  wrote:
>> Hello,
>> 
>> Is there a way to setup ipfw3 nat to a dynamic ip address? I get an ip from 
>> my isp via dhcp. This looks like it used to be possible by nat-ing to an 
>> interface, but the current version only accepts ip addresses.
>> 
>> Thanks,
>> Sam


ipfw3 nat to dynamic ip

2021-12-23 Thread samg
Hello,

Is there a way to setup ipfw3 nat to a dynamic ip address? I get an ip from my 
isp via dhcp. This looks like it used to be possible by nat-ing to an 
interface, but the current version only accepts ip addresses.

Thanks,
Sam