Forward specific subnet to one ip

I want all packet to specific subnet as example 1.1.1.0/24 will go to one IP address 1.1.1.1. I have try with squid proxy.

acl test dst 1.1.1.0/24
http_access allow test
tcp_outgoing_address 1.1.1.1 test

And got error message :

2023/10/09 21:17:23 kid1| commBind Cannot bind socket FD 12 to 1.1.1.1: (99) Cannot assign requested address

What other program can forward specific subnet to one destination, proxy program or anything, I want use for openwrt.

Example :
curl 1.1.1.33, the destination will go to 1.1.1.1

You want a destination nat. I assume you can configure this firewall rule just fine and easily with Luci.

3 Likes