( mncmann | 2022. 05. 28., szo – 17:25 )

wifin fent csüng a pi most is .

dnsmasq telepitve .

ip route list

default via 192.168.0.1 dev wlx2cab25bf6ba6 proto dhcp src 192.168.0.19 metric 303

192.168.0.0/24 dev wlx2cab25bf6ba6 proto dhcp scope link src 192.168.0.19 metric 303

 

pi@raspberrypi:~ $ sudo iptables -F

pi@raspberrypi:~ $ sudo iptables -t nat -F

pi@raspberrypi:~ $ udo iptables -t nat -A POSTROUTING -o wlx2cab25bf6ba6 -j MASQUERADE

-bash: udo: command not found

pi@raspberrypi:~ $ sudo iptables -t nat -A POSTROUTING -o wlx2cab25bf6ba6 -j MASQUERADE

pi@raspberrypi:~ $ sudo iptables -A FORWARD -i wlx2cab25bf6ba6 -o enxb827eb6289f4 -m state --state RELATED,ESTABLISHED -j ACCEPT

pi@raspberrypi:~ $ sudo iptables -A FORWARD -i enxb827eb6289f4 -o wlx2cab25bf6ba6 -j ACCEPT

pi@raspberrypi:~ $ sudo nano /proc/sys/net/ipv4/ip_forward

pi@raspberrypi:~ $ sudo nano /etc/sysctl.conf

pi@raspberrypi:~ $ sudo ip route del 0/0 dev eth0 &> /dev/null

pi@raspberrypi:~ $ a=`route | awk "/${wlx2cab25bf6ba6}/"'{print $5+1;exit}'`

pi@raspberrypi:~ $ sudo route add -net default gw 192.168.2.1 netmask 0.0.0.0 dev enxb827eb6289f4 metric $a

SIOCADDRT: Network is unreachable

pi@raspberrypi:~ $ a=`route | awk "/${wlx2cab25bf6ba6}/"'{print $5+1;exit}'`

pi@raspberrypi:~ $ sudo route add -net default gw 192.168.2.1 netmask 0.0.0.0 dev enxb827eb6289f4 metric $a

SIOCADDRT: Network is unreachable

pi@raspberrypi:~ $ sudo nano /etc/dnsmasq.conf

pi@raspberrypi:~ $ sudo systemctl start dnsmasq