Page 1 of 1

Internet sharing of two different interfaces [SOLVED]

PostPosted: Aug 7th, '14, 22:15
by josh
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?

Re: Internet sharing of two different interfaces

PostPosted: Aug 8th, '14, 08:28
by jiml8
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

Re: Internet sharing of two different interfaces

PostPosted: Aug 8th, '14, 09:06
by josh
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.

Re: Internet sharing of two different interfaces

PostPosted: Aug 8th, '14, 09:33
by jiml8
Yes, of course it is ethernet. What do you think is getting transported across your DSL and your wifi connections?

Re: Internet sharing of two different interfaces

PostPosted: Aug 8th, '14, 09:52
by josh
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 ...

Re: Internet sharing of two different interfaces [SOLVED]

PostPosted: Aug 8th, '14, 11:00
by jiml8
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.