yes, the table parameter was missing ! # ip route add default via 192.168.144.254 dev wlan0 *table tap0* Le mer. 9 nov. 2022 à 17:10, Felix Yan <felixonmars@archlinux.org> a écrit :
On 11/9/22 17:52, Pascal wrote
# ip tuntap add tap0 mode tap user me # ip addr add 192.168.11.254/24 dev tap0 # ip link set tap0 down # echo 11 tap0 >> /etc/iproute2/rt_tables # ip rule add from 192.168.11.254 lookup tap0 > # ip route add default via 192.168.144.254 dev wlan0 proto dhcp src 192.168.144.1
Assuming your `ip rule` is trying to apply policy routing on `from 192.168.11.254` only, the ip route entry added here is missing a table parameter.
You probably want instead:
# ip route add default via 192.168.144.254 dev wlan0 table tap0
# echo 1 > /proc/sys/net/ipv4/ip_forward # iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERAD -- Regards, Felix Yan