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 09-12-2018, 02:16 PM   #1
ahbarrera78
LQ Newbie
 
Registered: Sep 2018
Posts: 2

Rep: Reputation: Disabled
Setting up IP Passthrough on Linux


Hello,

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.

Thanks in advance! - Anthony
 
Old 09-12-2018, 05:01 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
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....

https://wiki.debian.org/BridgeNetwor...a_wireless_NIC
https://wiki.debian.org/BridgeNetwor...ctionsProxyArp

Last edited by ferrari; 09-12-2018 at 05:18 PM.
 
Old 09-12-2018, 06:22 PM   #3
ahbarrera78
LQ Newbie
 
Registered: Sep 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
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 View Post
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....

https://wiki.debian.org/BridgeNetwor...a_wireless_NIC
https://wiki.debian.org/BridgeNetwor...ctionsProxyArp

Last edited by ahbarrera78; 09-12-2018 at 06:24 PM.
 
Old 09-12-2018, 07:32 PM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
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...

https://www.tunnelsup.com/raspberry-...te-ssh-tunnel/
https://juliansimioni.com/blog/howto...h-ssh-tunnels/
 
  


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
LXer: Linux virtualization and PCI passthrough LXer Syndicated Linux News 0 10-29-2009 12:20 PM
how to enable ipsec passthrough in linux-2.6.14 using openswan aparna8419 Linux - Networking 0 04-04-2007 03:26 AM
VPN Passthrough on Linux himyuza Linux - Networking 2 01-12-2006 04:59 AM
Ip-Passthrough and linux not getting along Kyle Katarn Linux - Networking 1 12-24-2005 03:21 PM

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

All times are GMT -5. The time now is 11:38 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