F
F
fr4nki2016-06-04 00:14:57
linux
fr4nki, 2016-06-04 00:14:57

How to distribute the Internet to LAN via wifi and lan (+ pppoe question)?

Hey!
Please tell me how to implement the following scheme in the office: the Internet comes via cable from the provider, the connection is via pppoe. The task is to distribute the Internet to the n-port switch via cable and distribute Wi-Fi. Everything must be done from one computer. There is a computer with 2 ethernet ports and 2 network cards running Ubuntu. Ideally, make a working (password-protected) and guest (with a cut channel thickness) Wi-Fi, but the necessary minimum is to force Ubuntu to distribute the Internet from eth0 to eth1 and wlan0, that is, without a guest Wi-Fi. Correct me if I'm wrong, but I see the scheme as follows - merge eth1 and wlan0 into a bridge and forward packets via iptables from eth0 to br0. Is this the right solution or is there something simpler and more reliable? I already figured out the access point through hostapd in the master mode, it remains only to figure out how to drive traffic. There is no need to block or filter traffic.
And a question on pppoe. After running pppoeconf, another interface appears, let's call it conditionally qw0. Do I understand correctly that in this case, all traffic will go through this interface and you need to forward packets from it, and not from eth0?
Thank you all in advance for your help.
PS. I apologize for maybe obvious questions, but I'm not on friendly terms with Linux at all.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Shitskov, 2016-06-04
@Zarom

Bridges cannot be used - you need to natit packets on the Internet access. In your case, this is the pppoe interface. Set up nat in iptables on this interface and enable forwarding in ubuntu. This will already be the minimum-sufficient for the Internet to work on local interfaces.
Material from Alexander Karabanov : kubuntu.ru/nat-iptables

A
Armenian Radio, 2016-06-04
@gbg

To solve your problem, there are ready-made distributions, both paid and free:
Kerio Control
OpenWRT
pfSense
All of them provide a convenient interface for creating networks.
OpenWRT can create multiple WiFi and connect different VLANs to them.
pfSense can do shaping. It remains only to culturally adjust everything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question