PPPOE with 2 adsl modems in bridge mode on CENTOS 5.1 server?


The setup: CENTOS 5.1 with Asterisk server <-subnet 1-><-Mikrotik Router-><-subnet2-><ADSL Modem1>
                                                            -><-Mikrotik Router-><-subnet3-><ADSL Modem2>

I wish to use PPPOE on the CENTOS 5.1 server so as to ensure the Asterisk is effectively not behind a NAT.
The Linux CENTOS 5.1 server should do the PPPOE dialup . Username and password supplied. Both modems are set to PPPOE passthrough mode.

How do I setup the CENTOS server and the asterisk server please?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

There's a nice collection of scripts made by a company called "Roaring Penguin".


These scripts automate the set up of PPPoE and should suite your needs as they are quite easy to use.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

the obvious question is: WHERE do you want to connect the pppoe TO?


PPPoE is a layer 2 protocol, and as such will not work over the "<-subnet 1-><-Mikrotik Router-><-subnet2-><ADSL Modem1>", you will have to have the ADSL modems on the same LAN segment:

ADSL Modem 2
ADSL Modem 1

Is it possible to set it up this way?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

It may be possible if there is a bridge created across the router ports.

But in the end, it does very much depend on what is the intended destination end of the PPPoE.


"But in the end, it does very much depend on what is the intended destination end of the PPPoE."

"Both modems are set to PPPOE passthrough mode."

I'd say the end would be an ADSL connection Mike, connecting back to a PPPoE client on the CentOS box, I'm also assuming he wants both ADSL connections to terminate on the CentOS server?

Is that correct Shaun?
If that's the intent (PPPoE connection to an 'ISP' account) then it should be possible to do by bridging the router ports on the mikrotik between subnet 1 & subnet 2.

That *would*, of course, essentially defeat purpose of having a firewall there at all, and so it would probably be better to connect the server to a VLAN on the subnet1 port of the mikrotik router.  You can do that by adding a vlan port on the server (don't ask me HOW to do it, but I'm sure oit can be done ;-) then bridge the vlan on the mikrotik to the subnet 2 port.  Then run the PPPoE on the vlan to bring up a connection to the ISP.

I agree with Mike's solution.

As for the Linux VLAN part, CentOS has a handy little tool called vconfig:

# vconfig add eth0 10

This would add a VLAN 10 interface on eth0, the new interface would be called eth0.10 - you can use it just like a normal interface (example):

# ifconfig eth0.10 up

shaunwinginAuthor Commented:
I need only connect through the one ADSL. I can move the ADSL to a second network port on the Asterisk server. This woudl obviously make it a lot simpler. How can I protect the CENTOS 5.1 server in this case.

If I use the VLAN option described will I have any firewall protection from the Mikrotik? Will the VALN put a lot of extra load on the CENTOS server? At the moment subnet 1 is /24 . Excude my ignorace but if I make a VLAN will I need to change the subnet 1 to e.g and then use the same for the VLAN on the CENTOS 5.1?

The whole reason for this setup change is to enable the sip.conf redirect=yes option to work. Is there any way to get it to work with the present setup?

if you connect your server direct to an ISP service with PPPoE, then you obviously have no firewall in between.  You *can* use a firewall (e.g. iptables) on your server to give protection.  You simply block all ports except what you explicitly require to make SIP etc work.  That is technically equivalent to having a firewall ahead of the server.

If you really must have a firewall in front, then you should ask for a subnet of static IP addresses from your ISP and then route the public addresses through the firewall and on to the centos system behind.  So long as you avoid any NAT, then your SIP server is as good as in the open.

Cheers,  Mike.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IP Telephony

From novice to tech pro — start learning today.