Author Topic: Gateway configuration with ADSL router  (Read 3035 times)

tenshi8x

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Gateway configuration with ADSL router
« on: January 11, 2014, 03:35:04 pm »
Good afternoon, and congratulations for the distribution.

I have a low-power consumption miniITX PC with an Intel Atom and 2GB of RAM and gigabit ethernet I want to use as an headless central home-server and internet gateway.

I have just restructured my network buying an inexpensive gigabit switch and an ADSL modem/router with a unique ethernet port which work perfectly unless I try to use the PC as a gateway.

More specifically, the ADSL modem is configured with PPPoE protocol with my ISP username and password, has 192.168.1.1 as IP and Internet works perfectly if i plug the modem and one or more PCs to the gigabit switch. The PCs have all a static IP in 192.168.1.0 network.

The problem comes when I try to plug the modem to the eth1 of the gateway, set as an external interface, and the other one (eth0) to the gigabit switch. In this case I change the internal network to 192.168.2.0.
I am able to enter the webinterface of Zentyal and also with SSH, but the gateway neither acts as an internet gateway nor it is able to connect to the Internet itself.

I am able to ping eth0 with address 192.168.2.1, and also eth1 with IP 192.168.1.2 (I tried both with static IP and with the same IP got from the ADSL modem DHCP server), but I am not able to ping the modem itself with IP 192.168.1.1 from another PC and also from the Zentyal PC with the webinterface network tools. I am also unable to ping any internet website or to solve any DNS.

I tried also to set the gateway as 192.168.1.1 in Zentyal or to get it from DHCP, but nothing changed, neither if I deactivate the firewall.

The only way I managed to use Zentyal PC as gateway with the configuration ADSL modem <---> Zentyal gateway (eth1) <---> switch <---> PC1, Zentyal gateway (eth0) is by setting eth1 as PPPoE with the same ADSL modem ISP username and password.
The problem is that eth1 is no longer pingable and Zentyal does not allow to set traffic shaping rules on upload (eth1) with PPPoE configuration, and I'd like to use them to shape traffic preventing mass-download programs to choke the connection and to prioritize voip and other real-time traffic.

I hope someone will help me to solve this problem.

Thank you, and have a nice day!

F. D.

robb

  • Guest
Re: Gateway configuration with ADSL router
« Reply #1 on: January 11, 2014, 04:53:30 pm »
In order to use Zentyal as a gateway, you _must_ have (at least) 2 interfaces. Furthermore, those 2 interfaces _must_ be in different subnets.

your situation will be as follows:

internet - modem/router - zentyal (ext) - zentyal (int) - switch - LAN
where internal interface of modem/router and zentyal (ext) are on a subnet and zentyal (int) and your LAN are on another subnet.

weißnix

  • Zen Monk
  • **
  • Posts: 76
  • Karma: +1/-0
    • View Profile
Re: Gateway configuration with ADSL router
« Reply #2 on: January 11, 2014, 06:08:57 pm »
Basic Config
Module Network
1. external Interface (eth1)
use static IP   e.g 192.168.1.2 netmask 255.255.255.0
check external

2. internal Interface (eth0)
use static IP e.g. 192.168.2.1 netmask 255.255.255.0
uncheck external

3.add Gateway
on IF eth1
IP 192.168.1.1
check standard

Module DNS

1. add Forwarder
ip 192.168.1.1

Module DHCP

1. check for eth0
Config:
standardgateway: zentyal
first Nameserver:zentyal
WINS and NTP: zentyal

2. uncheck for eth1

see also attached png

Clientconfig: use dhcp

sry, i'm german. my english is horrible  :'(
« Last Edit: January 11, 2014, 06:25:54 pm by weißnix »
Zentyal 7 auf Atom D525; 4GB RAM, 240 GB SSD,

File- und Mailserver
Remotezugriff via VPN

robb

  • Guest
Re: Gateway configuration with ADSL router
« Reply #3 on: January 11, 2014, 06:13:26 pm »
That will work. Be aware you need to define default gateway in eth1 (GW = router) and for your LAN GW = Zentyal eth0

tenshi8x

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Gateway configuration with ADSL router
« Reply #4 on: January 11, 2014, 09:24:52 pm »
Good evening, and thank you for all the advices!

Indeed, the only thing I didn't try was to add the ADSL modem IP as DNS to the forward list, but it didn't work as well.

I don't know why, but I tried to remove eth1 (a usb to ethernet adapter) and to reboot the server, then I plugged it back and rebooted the server again, set DHCP to eth1 and removed 192.168.1.1 to the DNS forward list, and everything started to work like a charm. Static IP on eth1 breaks the internet connection, though.

Now I can also ping the ADSL modem both from the Zentyal server and from the other PCs in the LAN. I also set DHCP to each PC in order to plug the modem directly to the switch in case of "emergency".

Thank you again, and have a nice day!

F.D.

altiport

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Gateway configuration with ADSL router
« Reply #5 on: April 08, 2014, 11:28:46 pm »
Hi,
Would it be too much trouble to ask you to summarize your final settings?  I'm in a similar situation and I just can't get it to work.

In a nutshell what i have is:
1. The router can ping the external interface
2. The server can ping the router
3. The router cannot ping the internal interface
4. The router cannot ping the clients
5. the clients cannot ping the router

thanks