Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running an embedded linux kernel version 3.14. My system has two network interfaces, a 4G LTE modem (ppp0) and an ethernet port (eth0).
I would like to setup IP Passthrough on my box, basically sharing/passing my 4G modems public IP to a single device connected to eth0.
When searching IP Passthrough, it seems that many products support this, but I only find instructions on how to configure those products that support IP Passthrough, not how to accomplish it myself in Linux so I can add this feature to my own product.
If anyone could help me out with any info, even any clues to get me searching in the right direction, I would really appreciate it. My current thought is that it is done through iptables, but I am hoping to find out if that thought is correct before I spend weeks learning about iptables.
Welcome to LinuxQuestions.org. Normally, I'd recommend setting up IP masquerading, but this involves using NAT, and you appear to be wanting to bridge the interfaces. There are a couple of approaches that may be suitable here. The first is using ebtables (which I haven't tried), and the second is using proxy ARP (which I have had success with). Start here for an idea on how these get implemented....
Hi Ferari, thank so much for your response I appreciate it. I believe what I want is modem to ethernet half bridge? My linux system again consists of a 4G modem and one ethernet. I have one device connected to my ethernet (say a router). So if my systems 4G modem has a public IP of 1.2.3.4, then if someone SSH's to 1.2.3.4, the connection will be passed through the eth0 of my system down to the router, and my SSH connection would connect to the router as if it was at 1.2.3.4. Does this sound like the behavior I can achieve with the two methods you linked me to? Thank you! - Anthony
Quote:
Originally Posted by ferrari
Welcome to LinuxQuestions.org. Normally, I'd recommend setting up IP masquerading, but this involves using NAT, and you appear to be wanting to bridge the interfaces. There are a couple of approaches that may be suitable here. The first is using ebtables (which I haven't tried), and the second is using proxy ARP (which I have had success with). Start here for an idea on how these get implemented....
Not quite. Your devices behind the 4G modem will be using private IP addresses (DHCP or statically assigned), and the 4G device will need to have port forwarding enabled so that an SSH server on the LAN can be reached.
It may be easier for you just to set up internet sharing (with masquerading), and have the host device connect via a reverse SSH tunnel as these blogs illustrate...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.