You are not logged in.

#1 2019-06-26 23:55:26

albmanhorse
Member
Registered: 2019-06-26
Posts: 5

[SOLVED] Sharing internet connection form wireless adapter to ethernet

Well I have follow this guide, because I want to share an internet connection using a laptop with a wireless card and a ethernet port as server, and a PC with ethernet port as client
https://wiki.archlinux.org/index.php/Internet_sharing

All fine no errors, but I can't get the client(the PC) to  have internet access. The laptop has internet connection, from the client side (the PC) I can only ping the ip address assigned to the PC and the address assigned to the laptop only, any other ip doesn't get any response. 

in the server side the device directly connected to internet via wifi is

wlp8s0

the device connected to the host via ethernet

enp9s0

output of (server side):

[albertoo@Helium ~]$ sudo iptables -nvL

Chain INPUT (policy ACCEPT 24334 packets, 18M bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       192.168.10.0/24      0.0.0.0/0            tcp dpt:53
    0     0 ACCEPT     udp  --  *      *       192.168.10.0/24      0.0.0.0/0            udp dpt:53

Chain FORWARD (policy ACCEPT 4618 packets, 310K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  enp9s0 wlp8s0  0.0.0.0/0            0.0.0.0/0           
 
Chain OUTPUT (policy ACCEPT 16210 packets, 1892K bytes)
 pkts bytes target     prot opt in     out     source               destination     

and (server side)

ifconfig
enp9s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.10.10  netmask 255.255.255.0  broadcast 192.168.10.255
        inet6 fe80::54d1:3285:5024:f0da  prefixlen 64  scopeid 0x20<link>
        ether 54:be:f7:76:1e:d7  txqueuelen 1000  (Ethernet)
        RX packets 5906  bytes 473850 (462.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2542  bytes 250887 (245.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 18  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 53  bytes 4683 (4.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 53  bytes 4683 (4.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.142.0.26  netmask 255.255.255.255  destination 10.142.0.25
        inet6 fe80::cc1:841b:d431:6563  prefixlen 64  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
        RX packets 16939  bytes 17318277 (16.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13534  bytes 1147738 (1.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.239  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::a6db:30ff:fe7c:3fdb  prefixlen 64  scopeid 0x20<link>
        ether a4:db:30:7c:3f:db  txqueuelen 1000  (Ethernet)
        RX packets 34425  bytes 20476238 (19.5 MiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 13850  bytes 2519896 (2.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

the dnsmasq output (server side)

systemctl status dnsmasq
● dnsmasq.service - A lightweight DHCP and caching DNS server
   Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-06-27 00:03:10 BST; 44min ago
     Docs: man:dnsmasq(8)
 Main PID: 590 (dnsmasq)
    Tasks: 1 (limit: 4915)
   Memory: 2.2M
   CGroup: /system.slice/dnsmasq.service
           └─590 /usr/bin/dnsmasq -k --enable-dbus --user=dnsmasq --pid-file

Jun 27 00:03:10 Helium dnsmasq[586]: dnsmasq: syntax check OK.
Jun 27 00:03:10 Helium systemd[1]: Started A lightweight DHCP and caching DNS server.
Jun 27 00:03:10 Helium dnsmasq[590]: started, version 2.80 cachesize 150
Jun 27 00:03:10 Helium dnsmasq[590]: compile time options: IPv6 GNU-getopt DBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
Jun 27 00:03:10 Helium dnsmasq[590]: DBus support enabled: connected to system bus
Jun 27 00:03:10 Helium dnsmasq[590]: reading /etc/resolv.conf
Jun 27 00:03:10 Helium dnsmasq[590]: using nameserver 8.8.8.8#53
Jun 27 00:03:10 Helium dnsmasq[590]: read /etc/hosts - 3 addresses
Jun 27 00:03:13 Helium dnsmasq[590]: reading /etc/resolv.conf
Jun 27 00:03:13 Helium dnsmasq[590]: using nameserver 8.8.8.8#53

The client which is running Ubuntu 18.10, with config:

ip add 192.168.10.11/24
gateway 192.168.10.10
dns 8.8.8.8

Thanks for your time girls/guys!

Last edited by albmanhorse (2019-07-06 22:27:48)

Offline

#2 2019-06-27 12:33:26

herOldMan
Member
Registered: 2013-10-11
Posts: 163

Re: [SOLVED] Sharing internet connection form wireless adapter to ethernet

Hi,


Have a look at the create_ap package, which is a script. It's documented on the "Software Access Point" wiki page.

I have used it for years and it does the trick for me.

Offline

#3 2019-06-27 13:25:00

albmanhorse
Member
Registered: 2019-06-26
Posts: 5

Re: [SOLVED] Sharing internet connection form wireless adapter to ethernet

Thanks for your answer,
the thing is that only one computer has a wireless card, the other only has an ethernet card.

Offline

#4 2019-07-05 20:15:19

albmanhorse
Member
Registered: 2019-06-26
Posts: 5

Re: [SOLVED] Sharing internet connection form wireless adapter to ethernet

Problem solve!

I was sharing the wrong device, because I connect through a VPN and it's using a device call tun0 , so sharing tun0 solve the problem.

Offline

#5 2019-07-05 22:40:39

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Sharing internet connection form wireless adapter to ethernet

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB