LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-24-2024, 03:38 PM   #1
taspen
LQ Newbie
 
Registered: Apr 2024
Posts: 5

Rep: Reputation: 2
Sharing internet to USB gadget via RDNIS


As much as I love linux, I hate linux networking. I have a MilkV-Duo which is a little RISCV dev board that connects to my computer via RDNIS as a USB gadet. Then you can ssh into it. I need to be able to get this board online with full access to the internet by sharing my laptops wifi. What I'm looking for is a simple way to do get it done. I've used nftables once on my server but that was a year ago and I havn't touched it since. My laptop is using iptables-nft or UFW and it says not to edit the nftables anyway. After getting lost in iptables I installed UFW hoping it would be straight forward. Is UFW a good approch to avoid getting elbows deep into iptables/nftable? With the routes I added below I can ping my laptop at the wifi card IP (192.168.0.122) but I can't ping my wifi router (192.168.0.1) or anywhere beond that from the Duo.

I set these UFW rules on my laptop . (debian)
```
Status: active

To Action From
-- ------ ----
[ 1] Anywhere on wlp2s0 ALLOW FWD Anywhere on enx3eebd35d9958
[ 2] Anywhere on enx3eebd35d9958 ALLOW FWD Anywhere on wlp2s0
[ 3] Anywhere (v6) on wlp2s0 ALLOW FWD Anywhere (v6) on enx3eebd35d9958
[ 4] Anywhere (v6) on enx3eebd35d9958 ALLOW FWD Anywhere (v6) on wlp2s0
```


On the Duo

```
[root@milkv-duo]~# ip route
default dev eth0 scope link src 169.254.93.130 metric 1001002
169.254.0.0/16 dev eth0 scope link src 169.254.93.130 metric 1002
192.168.0.1 via 192.168.0.122 dev eth0
192.168.0.122 via 192.168.42.1 dev usb0
192.168.42.0/24 dev usb0 scope link src 192.168.42.1
192.168.42.1 via 192.168.0.122 dev eth0
```
 
Old 06-06-2024, 03:04 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,162

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
Doesn't debian use NetworkManager? I set this up for home office equipment during the pandemic using nmcli.

I created a connection called office and share the wi-fi to it. For me the commands were:

Code:
nmcli connection add type ethernet ifname eno2 ipv4.method shared con-name office
nmcli connection up office
nmcli connection modify office ipv4.addresses 192.168.42.1/24
nmcli connection up office
I had to modify the IP because the one NM chose conflicted with my remote work. Maybe they used NM also. I used dnsmasq to provide DHCP and DNS to my office subnet 192.168.42.x but you can use a static IP and 8.8.8.8 or whatever if you prefer.

NM takes care of adjusting firewall rules correctly.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[gadget driver] HOST turns unresponsive to gadget driver niroop Linux - Embedded & Single-board computer 4 04-22-2015 08:30 AM
Sharing internet through data cable from a mobile that is already sharing via wifi Anil Kagi Linux - Newbie 7 02-05-2015 11:15 PM
set feature halt endpoint fails always USB linux driver usb gadget serial dot c sarmads1 Linux - Kernel 0 08-14-2012 10:06 PM
RDNIS Connection Causing Network Loss On Eth0 jmoschetti45 Linux - Networking 1 11-17-2009 03:37 PM
LXer: ARM to fuel netbook, internet gadget drive with Ubuntu LXer Syndicated Linux News 0 11-19-2008 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration