Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

how to set up ip forwarding, so the nodes can get to the internet through your MAAS host?

although my setup runs maas, commissions servers, turns nodes on and off, nodes are at ready state.

i have a juju issue, that i just can shake. i am looking to see if there is any special routing between, the maas/region/cluster located @ 192.xxx.xxx.xxx/MAAS on eth0 has full internet access. and the internal private network address where the 10 nodes are located @ 10.xx.xx.xx.

now this is metal none vm. please be specific when answer is posted.

any help, will be great.

share|improve this question

2 Answers 2

this is how it is done:

do this on the maas/region cluster controller. this only for those who have maas/region cluster running on one server.

sudo nano nat.sh

then: copy and paste the contents of the link:

https://help.ubuntu.com/community/Router#Enable_IP_forwarding_and_Masquerading

save file nat.sh

After configuring the 2 variables, if necessary, ( i found it not necessary)

save the script below as nat.sh and make it executable by doing

chmod a+x nat.sh

Now, test the script by running as root

sudo sh nat.sh

Investigate the messages from the console output to see if any error happened. If everything looks fine, use another host in the internal network to test if it can access the external network (presumably the Internet). A quick way to test is pinging Google public DNS from the console.

ping -c 3 -W 10 8.8.8.8 If ping responds, make our new script bootable so we don't have to run the script every time we restart.

sudo cp nat.sh /etc/init.d/

sudo ln -s /etc/init.d/nat.sh /etc/rc2.d/S95masquradescript

As a final test, restart your computer and test to see if you still have the same functionality. If so then congratulations! If not then make sure you followed the above correctly so the script is bootable.

it worked beautifully. test by plugging a laptop on the node side of you router, and you should have internet.

share|improve this answer

I don't believe MAAS will setup such routing by itself. You should be able to tell the MAAS machine to NAT your 10.0.* network, though. I would suggest getting that working manually as a test case, then trying with MAAS once the MAAS machine networking is right. Good luck!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.