Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DHCP + PPPOE on a single WAN interface

Hey all,

Is is possible (and if it is, then how?) to use both DHCP (for intranet address) and pppoe (for internet access) over a single WAN interface. I know it is generally possible in Linux (and Windows for that matter) but does Astaro support such feature?

Basically my setup would be like this:

LAN Interface (192.168.x.0/24)
WAN Interface (10.0.0.0/24, for intranet outside my local LAN) and 83.x.x.x/something for Internet access via PPPOE.


Thanks for your help already in advance!


This thread was automatically locked due to age.
  • Additional Addresses on PPPoE Interfaces will be set on the ethernet interface, not the ppp interface. So you can archive want you want with a static additional address, however you can't have it with DHCP...

    Cheers
     Ulrich
  • Additional Addresses on PPPoE Interfaces will be set on the ethernet interface, not the ppp interface. So you can archive want you want with a static additional address, however you can't have it with DHCP...

    Cheers
     Ulrich


    Thank you for your help Ulrich,

    So basically i have to add additional IP address on additional addresses page? How about routing / firewall rules so I can forward the traffic to 10.0.0.0/8 network via the ethX interface instead of PPPOE interface?

    Also do I have to add some special firewall rules in order for my setup to work?
  • Just add a static route saying 10.0.0.0/8 via default gateway 10.x.x.x

    Do you have to Masquerade the connections to 10.0.0.0/8? If yes, you
    have to create an additional SNAT rule, translating 192.168.x.0/24 to your IP address of your additional address (because you can't use masquerading for that, it would only match ppp internet traffic).

    That should be all. Just ensure that the normal packet filter rules are also installed to allow traffic.
  • I gave the eth1 (external interface) an additional ip in 10.0.0.0/24 range (from the same subnet that dhcp would give me an ip)

    Also I made a following static route:

    route type: gateway route
    network: intranet (type network, interface: external, ipv4 address 10.0.0.0/8)
    gateway: 10.119.0.1, interface external, ipv4 address 10.119.0.1

    However i still can't access the intranet sites (trying to traceroute and ping computers in 10.0.0.0 network) I have tried also accessing them directly from my astaro machine with no luck so it shouldn't be forwarding issue. Am i doing something wrong here?


    Edit:

    Basically i want to achieve following using Astaro (this is how i did it in dd-wrt some time ago)

    External interface = eth1
    Internal interface = eth0
    Internet connection = ppp0, configured using webui (making an interface eth1 using pppoe results in ppp0 interface)

    ifconfig eth1 10.119.0.x netmask 255.255.255.0
    route add -net 10.0.0.0 gw 10.119.0.1 netmask 255.0.0.0

    iptables -A FORWARD -i eth0 -o eth1 -d 10.0.0.8/8 -j ACCEPT
    iptables -t nat -A POSTROUTING -o eth1 -d 10.0.0.0/8 -j MASQUERADE

    Is this possible using Astaro + WebUi?
  • Dont bind your route network and route gateway definitions to the external interface!
    They will bind to the PPP interface, but not to the eth1 interface.
  • Just add a static route saying 10.0.0.0/8 via default gateway 10.x.x.x

    Do you have to Masquerade the connections to 10.0.0.0/8? If yes, you
    have to create an additional SNAT rule, translating 192.168.x.0/24 to your IP address of your additional address (because you can't use masquerading for that, it would only match ppp internet traffic).

    That should be all. Just ensure that the normal packet filter rules are also installed to allow traffic.


    Dont bind your route network and route gateway definitions to the external interface!
    They will bind to the PPP interface, but not to the eth1 interface.


    That's what i feared. However only options to where i could bind the route network and route gateway are internal and external (there's no option for anything else - unfortunately). Either I'm doing something wrong (most likely [:)])) or Astaro can't achieve what i'm planning to do.

    EDIT:
    Edited a bit the part what i wan't to achieve.  Da_Merlin, Do you know if what i want to achieve is possible using webui or should i use CLI since I tested it to be working using the commands I posted above. However if i use CLI I have to type the commands everyr time I reboot my router.
  • Rule #1 - Never bind a definition to a specific interface; always leave it with 'Interface: >'. 
    Rule #2 - See Rule #1. [;)]

    Cheers - Bob

    Sorry for any short responses!  Posted from my iPhone.
  • Rule #1 - Never bind a definition to a specific interface; always leave it with 'Interface: >'. 
    Rule #2 - See Rule #1. [;)]

    Cheers - Bob

    Sorry for any short responses!  Posted from my iPhone.


    Thank you for your response, however changing the definitions to interface "any" did not help.

    At the moment the only way i was able to get the results i wanted were:

    1) use switch to split the WAN connection to two separate NIC:s
    2) use the CLI commands I posted couple posts ago
  • 1) use switch to split the WAN connection to two separate NIC:s

    I used to think that this never would work, but, earlier today, I learned differently.  According to a post in the Beta forum from one of the developers, the only limitation is that you can't route traffic between the two segments.

    I'm no iptables guru, but I think I understand what you're doing:

    fconfig eth1 10.119.0.x netmask 255.255.255.0

    In 'Interfaces & Routing >> Interfaces', put an Additional Address 10.119.0.x/24 (where 1 
    route add -net 10.0.0.0 gw 10.119.0.1 netmask 255.0.0.0

    In 'Interfaces & Routing >> Static Routing', create a "Gateway route" '{10.0.0.0/8} -> {10.119.0.1}'.

    iptables -A FORWARD -i eth0 -o eth1 -d 10.0.0.8/8 -j ACCEPT

    In 'Network Security >> Firewall', create a rule 'Internal (Network) -> Any -> {10.0.0.0/8} : Allow' 

    iptables -t nat -A POSTROUTING -o eth1 -d 10.0.0.0/8 -j MASQUERADE

    In 'Network Security >> NAT', create a rule 'Internal (Network) -> Any -> {10.0.0.0/8} : SNAT from External [Addl 10.] (Address)'

    That's what da_merlin described, so I would infer that it should work with or without the switch and second interface.

    Cheers - Bob
    PS And, welcome to the User BB!  We're always glad to have someone around that speaks iptables!

  • PS And, welcome to the User BB!  We're always glad to have someone around that speaks iptables!


    Thanks a lot, sometimes iptables makes more logic (at least for me) than the "random" GUI:s / webadmins :-). With iptables you can use manpages to get things done - but with webguis you have to udnerstand what each setting do and sadly they aren't that well documented always (huge popularity comes with huge communities and manuals - hoorray for iptables!). Admittedly iptables isnt the most userfriendly. Basic stuff is almost always easier to do with webguis. Also managing pure iptables firewall (meaning no web/graphical UI:s) can be a bit of a pain in the butt when your config file grows and grows :-)

    However, thanks for all the help Bob and Ulrich, now the system is working as I wanted and without your help i wouldve possibly went to "dirty" road and made a shell script to achieve a working system.

    Cheers,
    Ville