Page 1 of 1

BGP+NAT doesn't work

Posted: Wed Sep 04, 2019 11:44 am
by Sabrewulf
Hi.

I have 2 uplinks ("ext1", "ext2" interfaces) with 2 full view BGP sessions, my own PI network ("pi" interface, network 1.1.1.0/24). Announcing and routing between "pi" and internet works fine.

I have another interface ("int") where located network 192.168.250.240/28. I would like to NAT hosts from this network. How I can do this?

I tried to add new IP 1.1.1.250. It successfully pings from internet. Then I added rule:
0 chain=srcnat action=src-nat to-addresses=1.1.1.250 src-address=192.168.250.240/28 log=no log-prefix=""
but nothing works, and packet counter still zero.