Internet sharing of two different interfaces [SOLVED]

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Internet sharing of two different interfaces [SOLVED]

Postby josh » Aug 7th, '14, 22:15

Hello to all "drak" specialists,

where would I have to start digging to enable not one but two (dynamic) interfaces for Internet sharing?

In my setup there is a PPPoE DSL connection and a 4G modem, both active on demand only. The respective interfaces are ppp0 and wwp0s20u2i3 (formerly known as wwan0 - oh those wonderful new IF names !!).

It's a NAT thing I suppose; on my previous router (home-brewn, Mandriva) the job was done by "Arno's Firewall" script which was able to enable the NAT translation for both interfaces.
Now my question is: can I do it by tweaking the drak scripts? If so, which one?
Last edited by josh on Aug 8th, '14, 09:53, edited 2 times in total.
josh
 
Posts: 6
Joined: May 31st, '13, 16:57

Re: Internet sharing of two different interfaces

Postby jiml8 » Aug 8th, '14, 08:28

What do you want to accomplish? Load sharing? Failover?

In your position, I would start by studying the bonding device. In fact, that is how I usually set such things up.

https://www.kernel.org/pub/linux/kernel ... onding.txt
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Internet sharing of two different interfaces

Postby josh » Aug 8th, '14, 09:06

jiml8 wrote:What do you want to accomplish? Load sharing? Failover?

Nothing fancy at all; the reason is simply that my DSL is relatively slow but flat rate, whereas my 4G is fast but metered. So I change between both according to the purpose.

Thanks for the hint about the bonding device. It looks like it's ethernet-only though.

I'm looking at the drakgw code right now.
josh
 
Posts: 6
Joined: May 31st, '13, 16:57

Re: Internet sharing of two different interfaces

Postby jiml8 » Aug 8th, '14, 09:33

Yes, of course it is ethernet. What do you think is getting transported across your DSL and your wifi connections?
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Internet sharing of two different interfaces

Postby josh » Aug 8th, '14, 09:52

It's just that the actual network interface for the DSL connection - the one that is relevant for the NAT - is PPP ...

Anyway, I have succeeded - the solution is as simple as adding annother line to /etc/shorewall/masq with the respective interface. Works immediately after restarting shorewall.

Should be easy to extend drakgw in order to add that feature. Maybe I'll play around a bit ...
josh
 
Posts: 6
Joined: May 31st, '13, 16:57

Re: Internet sharing of two different interfaces [SOLVED]

Postby jiml8 » Aug 8th, '14, 11:00

ppp will open a networking device. On linux, I believe it is ttyACMN where N is 0, 1, 2, etc. On FreeBSD, it is tunN.

You address that device like any other networking device. ppp handles the protocol and encapsulates the ethernet frame.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest