My ISP provides me with 8 static IP addresses (xxx.xxx.xxx.104/29) however the Gateway address they provide is dynamic and can change depending upon their system load.
What I am trying to do is set up a pppoe-client connection to my isp and get my internal 192.168.1.0/24 network to masquerade behind one of the fixed ip addresses (xxx.xxx.xxx.110) provided by my ISP.
What I dont understand is how to provide the default gateway information to clients on my internal 192.168.1.0/24 network when the default gateway information on the pppoe connection is dynamic.
Activate the “Add Default Route” checkbox in your outgoing pppoe-interface.
Set your routers’ internal LAN ip address as the gateway address for your clients (you have to anyway, as the gateway has to be in the same subnet as the client, so your clients cannot use the ISP’s gateway directly anyhow).
Done. (Assuming your have correct masquerading NAT-rule set up.)
You don’t need to enter a (static) default gateway in that situation.
It will be dynamically added when the PPPoE connection is online (and removed when it’s disconnected)…
Well I am part of the way there. I did a /system reset-configuration just to define a start point.
Using the setup command I gave the router an address of 192.168.0.1/24 and left the gateway alone. Within the setup menu I created a pppoe-client connection on the WAN interface and a DHCP server on the LAN interface.
I decided for simplicity until I get it working not to use the masquerading.
I now have the situation where from a client on the LAN I can ping both the router LAN interface and the WAN interface address as recieved by the pppoe-client. Using the router terminal I can ping the LAN client and 212.58.224.131 (this is the address of bbc.co.uk) proving that the router is getting a default gateway from the pppoe-client. I still cannot ping 212.58.224.131 (bbc.co.uk) from the LAN client.
should do the trick (if “pppoe-out1” is the name of your pppoe outgoing interface, change it above if named different).
Apart from that you should look that your DNS setup is correct. Usually you would hand out the routers’ (LAN) ip address as DNS server to the LAN clients. Then check the “Use Peer DNS” checkbox in the outgoing pppoe connection.
And last (but not least )set the routers’ dns caching server so that the LAN clients may actually use it:
/ip dns set allow-remote-requests=yes
If everything works you should REALLY secure your router against access from the internet: disable telnet, create some firewall rules etc. There is a wiki article describing some good practices IIRC.
If I may impose - how can I pass the other fixed IP’s from my ISP (xxx.xxx.xxx.105 - xxx.xxx.xxx.109) so they can be used by my webserver on another port of the router.
Reading the Reference guide suggests I need to set up a bridge from the router WAN port MAC address to another router port MAC address and then attach my webserver to that?