Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: Brave Dave on October 27, 2008, 03:06:29 AM
-
I have some custom routing requirements on my external interface - two gateways - one to the internet, one to another network
(sme in server/gateway mode)
I have created a script to do this
- where in the templates-custom tree would I place this to ensure it survives a reboot ?
-
I have some custom routing requirements on my external interface - two gateways - one to the internet, one to another network
(sme in server/gateway mode)
I have created a script to do this
- where in the templates-custom tree would I place this to ensure it survives a reboot ?
Please post your custom routing requirement here, using 'x's or something in place of any IP information that may be a security issue for you. This will increase your chances of getting an answer that will solve your issue.
Speaking in very general terms, any template fragment placed in /etc/e-smith/templates-custom/ will survive a reboot. Just keep in mind that template expansion doesn't automatically happen when you reboot your SME box. You'll either need to manually expand the templates using the /sbin/e-smith/expand-template utility or expand the templates as part of an SME event.
Greg
-
my internal network is : 192.168.1.0/24
external interface : 172.10.16.66
my default gateway : 172.10.16.69
I have another network which I can access through 172.18.17.65 so I issue
route add -net 192.168.20.0 netmask 255.255.255.0 gw 172.18.17.65
The file I would like to affect is;
/etc/sysconfig/network-scripts/route-eth1
eth1 is my external interface
but I can't figure out how to do this within the templating system
-
A start might be to duplicate
/etc/e-smith/templates/etc/sysconfig/network-scripts/route-ethX
under the templates-custom path.
/etc/e-smith/templates-custom/etc/sysconfig/network-scripts/route-ethX
Then add some new properties to the networks db.
db networks show
Plus some perl scripting.
-
davidbray,
If I understand what you are doing. I think you should be able to do it from the Local Networks menu under Security in Server-Manager without any custom work.
See: http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter11#Local_networks
-
Hi, Thanks for the replies
No you can't add external networks, they have to have a router on the local network
I have succeeded in following william_syd advice and modifying scripts around
/etc/sysconfig/network-scripts/route-ethX
and this is successfull, I kind of knew this, but this area is not as straight forward as say /etc/rc.d/init.d/masq;
-
Yes, I see what you are doing now. I have always had another router in front of SME. Then it is just a matter of adding the other subnets to local networks.
In this case SME IS the router.
I didn't read this:
(sme in server/gateway mode)
thoroughly enough. :(
-
No you can't add external networks, they have to have a router on the local network
You could add the networks db entry via the command line.
You could also solve this problem just in the masq script templates. If you allow icmp redirect packets in from your default router, and the default router knows the route to your additional route, then SME server will learn the correct route quickly enough.
-
Now that's a little gem
that old saying
look outside the (sme) box ...
thanks Charlie