LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-05-2021, 12:33 PM   #1
somanyquestions
Member
 
Registered: Jan 2019
Distribution: Ubuntu, Debian, Buildroot
Posts: 34

Rep: Reputation: Disabled
Allow connections between "outside" and a device directly connected to "main computer"?


Imagine a little 1-board computer with Linux, running as USB ethernet gadget, connected to a bigger Linux computer's USB host port. So there is a network connection.

I was so far working with an SSH tunnel connection to be able to SSH into the little computer from the "outside world", via the "main computer"'s connection to a switch.

Creating this tunnel connection is an extra burden for the client, though. And it appears not to allow UDP connections.

I have searched a bit about other ways of doing that without the SSH tunnel, and more universally.

I.e. optimally, the "main computer" would provide an IP address for reaching services running directly on it with TCP, UDP, SSH/SCP; and another IP address for reaching the "little computer" that's USB-connected to it, with all those protocols - and this internal connection being invisible to the outside. As if the "main computer" had 2 addresses on the same LAN jack - not necessarily in the same subnet.

I have found some topics that seem relevant - but I'm not exactly an admin, and I'm not sure I understood the relations between those things completely.

- NAT - to be set up with iptables
- routing, e.g. with ip route command
- MACVLAN in passthru mode

*If* I got it correctly, the last two won't completely help me, unless the "little computer" and the internal interface it's connected to have IPs already in the wanted subnet - and routing will just make them "findable" from the outside?
(it may be necessary that the little computer be in a different subnet from the main IP of the main computer)

So there is no way around using NAT? iptables seems not to be available in BusyBox, on which the "main computer"'s Linux is based, which is why I was shying away from it. Perhaps it can be added.
I would prefer minimalist solutions that don't require special software to be installed, anyway.

Last edited by somanyquestions; 08-05-2021 at 01:03 PM.
 
Old 08-05-2021, 12:38 PM   #2
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Take a look at wireguard, it should do what you want. It is bit of a pain to configure, so look at the free option of https://tailscale.com
 
Old 08-11-2021, 07:00 AM   #3
somanyquestions
Member
 
Registered: Jan 2019
Distribution: Ubuntu, Debian, Buildroot
Posts: 34

Original Poster
Rep: Reputation: Disabled
Minutes after Bridge set up, can't connect to host anymore

deleted, was supposted to be on thread

Last edited by somanyquestions; 08-11-2021 at 07:38 AM.
 
  


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
Exception in thread "main" java.lang.ClassFormatError: onmyown.Main (unrecognized cla zimboney Fedora 4 07-20-2007 01:00 PM
how to: "not allow root to login directly"? narly Linux - Security 2 05-01-2005 06:59 AM
(2) Main Menu's? Isn't it, "there can be only one?" for the term "Main"? t3gah LQ Suggestions & Feedback 1 04-09-2005 09:30 AM
what's the best way to swap files between directly connected linux and windows boxes? Lechium Linux - Networking 1 08-01-2004 01:47 PM
My clients "can browse" outside but "can't ping" outside mrnoe Linux - Networking 1 09-05-2003 02:55 PM

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

All times are GMT -5. The time now is 10:22 AM.

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