Martin <marti...@cryptolab.net> writes:

> #!/usr/sbin/nft -f
>
> table ip masqrule {}
> flush table ip masqrule
> table ip masqrule {
>   chain postrouting {
>     type nat hook postrouting priority srcnat; policy accept;
>     ip saddr 192.168.231.3/24 ip daddr != 192.168.231.3/24 masquerade
>   }
> }
>
> When I execute this file with sudo unfortunately nothing changes, I can
> not connect to the internet (trying www.google.com from phone).

I might guess it's because your masquerade rule does nothing. I'm not
sure though.

Anyways, a typical masquerade rule would specify the source network and
an outgoing interface. For example, I have in my Linux router:

ip saddr 10.0.2.0/24 oifname "enp1s0" masquerade

so for you that would become

ip saddr 192.168.231.0/24 oifname "wlxe8de27a5ab1c" masquerade

Reply via email to