LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Sharing WiFi with ethernet not working (https://www.linuxquestions.org/questions/linux-networking-3/sharing-wifi-with-ethernet-not-working-4175679335/)

doethreethousand 07-25-2020 12:15 AM

Sharing WiFi with ethernet not working
 
I can't figure out why this isn't working.

iptables
Code:

Chain INPUT (policy ACCEPT 190 packets, 157K bytes)
 pkts bytes target    prot opt in    out    source              destination       

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target    prot opt in    out    source              destination       
    0    0 ACCEPT    all  --  wlan0  eth0    192.168.1.0/24      anywhere            ctstate NEW
    0    0 ACCEPT    all  --  any    any    anywhere            anywhere            ctstate RELATED,ESTABLISHED

Chain OUTPUT (policy ACCEPT 163 packets, 14321 bytes)
 pkts bytes target    prot opt in    out    source              destination   

MASQUERADE  all  --  anywhere            anywhere

dnsmasq
Code:

interface=eth0
bind-interfaces
dhcp-option=3,192.168.1.1
dhcp-option=6,8.8.8.8
dhcp-option=121,192.168.1.1/24,192.168.1.1
dhcp-range=192.168.1.100,192.168.0.199,12h



ipaddr
Code:

╰─$ sudo ip addr                                                                                                                                                255 ↵
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:0e:a1:19:d4:1d brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 scope global eth0
      valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 94:39:e5:6c:53:a6 brd ff:ff:ff:ff:ff:ff
    inet 192.168.43.165/24 brd 192.168.43.255 scope global dynamic noprefixroute wlan0
      valid_lft 3586sec preferred_lft 3586sec
    inet6 2600:1004:b15f:db39:24f7:79b0:cda0:30cd/64 scope global dynamic noprefixroute
      valid_lft 3284sec preferred_lft 3284sec
    inet6 fe80::151d:1d28:c48c:8a3/64 scope link noprefixroute
      valid_lft forever preferred_lft forever

I enabled net packet forwarding

I'm not sure why this isn't working

smallpond 07-27-2020 10:28 AM

It would help a great deal if you explained what you are trying to do and what isn't working. The setup looks ok if you are connecting externally via wi-fi and want to share that connection via ethernet. Of course this requires that you have a default route set to a gateway on the wlan0 subnet, that you have a static IP on eth0 and that there is no other DHCP server on the eth0 subnet. Is networking still ok on this host? Is the ethernet-attached host not getting an IP? Is it not able to send and receive?


All times are GMT -5. The time now is 01:23 AM.