Re: [ubuntu-uk] [OT] Basic network gateway server setup
the firestarter firewall has this built in, and so would be verry easy to use On 1 September 2010 10:07, Jon Spriggs j...@spriggs.org.uk wrote: On 1 September 2010 09:29, Cornelius Mostert corneliusmost...@googlemail.com wrote: Hi 1 thing that no one mentioned as yet that might be obvious is the Subnet Mask. I have a similar setup but are using 2 routers and I found that the DHCP router needs to tell the clients that: 1. The Default Gateway should be the router connected to the Internet 2. Subnet Mask for the clients must be 255.255.0.0 Subnet mask needs to be the same for all the machines on the network. Typically on a home network, the subnet mask will be 255.255.255.0 (known as a /24 or 24 bit network), and this will provide enough scope for 254 hosts on your network (including your router). The subnet mask you've specified would give you 65534 hosts - many many more hosts than a home network would ever need, and to be honest, more hosts than most corporate networks need! -- Jon The Nice Guy Spriggs -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/ -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] [OT] Basic network gateway server setup
On 31 August 2010 23:10, Matthew Macdonald-Wallace matt...@truthisfreedom.org.uk wrote: Quoting Eddie B edd...@gmail.com: Hi everyone My hunch is that it's something to do with the routing tables, or maybe the DHCP on eth0, but I can't find a proper answer anywhere on Google. I was hoping to find some sort of sample config, as surely this is not an uncommon situation, but maybe I'm not searching for the right terms. Run this as root on the server: echo 1 /proc/sys/net/ipv4/ip_forward And see how you get on. M. -- Matthew Macdonald-Wallace matt...@truthisfreedom.org.uk http://www.truthisfreedom.org.uk/ -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/ I am currently using eBox (http://www.ebox-platform.com/) to do this sort of thing with very little background knowledge of how it is doing it behind the scenes! I can recommend it highly. I am using the beta (also based on 10.04) at the moment, but I understand it is due for release soon. HTH Steve Garton http://blog.sheepeatingtaz.co.uk -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] [OT] Basic network gateway server setup
On 01/09/10 08:06, Stephen Garton wrote: I am currently using eBox (http://www.ebox-platform.com/) to do this sort of thing with very little background knowledge of how it is doing it behind the scenes! I can recommend it highly. I am using the beta (also based on 10.04) at the moment, but I understand it is due for release soon. eBox was cool. It is now called Zentyal but the 2.0 release should be out today according to this: http://www.ebox-platform.com/archives/2010/08/27/477-zentyal-2-0-rc2-released/ Cheers Al -- The Open Learning Centre http://www.theopenlearningcentre.com -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] [OT] Basic network gateway server setup
Hi 1 thing that no one mentioned as yet that might be obvious is the Subnet Mask. I have a similar setup but are using 2 routers and I found that the DHCP router needs to tell the clients that: 1. The Default Gateway should be the router connected to the Internet 2. Subnet Mask for the clients must be 255.255.0.0 thanx -- _ Cornelius Mostert Senior IT Specialist United Kingdom: 075 2233 4818 International: 0044 75 2233 4818 -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] [OT] Basic network gateway server setup
On Wednesday 01 Sep 2010 09:29:35 Cornelius Mostert wrote: 1 thing that no one mentioned as yet that might be obvious is the Subnet Mask. I have a similar setup but are using 2 routers and I found that the DHCP router needs to tell the clients that: 1. The Default Gateway should be the router connected to the Internet 2. Subnet Mask for the clients must be 255.255.0.0 The subnet mask for the clients should be whatever their subnet size is, which for a typical NAT router is almost always /24 (255.255.255.0). If you have a /16 subnet (255.255.0.0), that is fairly atypical for a home router. Regards, Tyler -- An Englishman, even if he is alone, forms an orderly queue of one. -- George Mikes -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] [OT] Basic network gateway server setup
On 1 September 2010 09:29, Cornelius Mostert corneliusmost...@googlemail.com wrote: Hi 1 thing that no one mentioned as yet that might be obvious is the Subnet Mask. I have a similar setup but are using 2 routers and I found that the DHCP router needs to tell the clients that: 1. The Default Gateway should be the router connected to the Internet 2. Subnet Mask for the clients must be 255.255.0.0 Subnet mask needs to be the same for all the machines on the network. Typically on a home network, the subnet mask will be 255.255.255.0 (known as a /24 or 24 bit network), and this will provide enough scope for 254 hosts on your network (including your router). The subnet mask you've specified would give you 65534 hosts - many many more hosts than a home network would ever need, and to be honest, more hosts than most corporate networks need! -- Jon The Nice Guy Spriggs -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] [OT] Basic network gateway server setup
On Tue, 31 Aug 2010 22:58:13 +0100 Eddie B wrote: Hi everyone Sorry this isn't the right place to ask this... but I've spent the whole day reading articles about how to setup networks and routing tables and such like and still failing miserably. I'm hoping there's something I'm missing that is a beginner's error! I'm trying to do something that is probably really simple. I have a server which has two interfaces. eth0 obtains an IP (192.168.1.20) by DHCP for the internet from a router sitting on 192.168.1.1. The server, as such, is able to get onto the internet. eth1 connects into a hub, via which all other workstations will connect. eth1 has a static IP, 192.168.2.1. So far I've got the workstations obtaining correct IP addresses (pool starting 192.168.2.100), so I assume the DHCP server is working properly, but no more than that. Can't even ping the server at 192.168.2.1 - “Reply from 192.168.2.1: Destination host unreachable”. My hunch is that it's something to do with the routing tables, or maybe the DHCP on eth0, but I can't find a proper answer anywhere on Google. I was hoping to find some sort of sample config, as surely this is not an uncommon situation, but maybe I'm not searching for the right terms. For reference, I'm using Karoshi 7, which is based on Ubuntu 10.04 LTS 64-bit. I'm hoping someone here can help. I'm a bit of a newbie to Ubuntu networking. If you want, I would be happy to make a donation to a LUG or some other FOSS project in return for your assistance. Apologies again for being in the wrong place but I've been a lurker for over a year and didn't know who else to turn to. Many thanks Eddie Hi Eddie, Can I ask what reason you are trying to get all your workstation's traffic to traverse your server? I would have thought an easier option for you, if it meets with your requirements, would be the following: + Router has a static IP address of 192.168.1.1 + Router has DHCP disabled. + Server's eth0 has a static IP address of 192.168.1.2 + Server's eth1 is disconnected and no config applied to it. + Server is configured to give out addresses by DHCP with 192.168.1.1 as the client's default route (and DNS, depending on your setup). + Clients then receive their IP address and other network information from the server, but all traffic that is not specifically *for* the server goes via the Router. Grant. -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] [OT] Basic network gateway server setup
On Tuesday 31 Aug 2010 22:58:13 Eddie B wrote: I'm trying to do something that is probably really simple. I have a server which has two interfaces. eth0 obtains an IP (192.168.1.20) by DHCP for the internet from a router sitting on 192.168.1.1. The server, as such, is able to get onto the internet. eth1 connects into a hub, via which all other workstations will connect. eth1 has a static IP, 192.168.2.1. So far I've got the workstations obtaining correct IP addresses (pool starting 192.168.2.100), so I assume the DHCP server is working properly, but no more than that. Can't even ping the server at 192.168.2.1 - “Reply from 192.168.2.1: Destination host unreachable”. My hunch is that it's something to do with the routing tables, or maybe the DHCP on eth0, but I can't find a proper answer anywhere on Google. I was hoping to find some sort of sample config, as surely this is not an uncommon situation, but maybe I'm not searching for the right terms. Eddie, What you are trying to do is make this server act as a router (also called a gateway). It sounds like you have the right idea. Start at the ping issue, as that's not routing, just networking. Where is the DHCP server for the 192.168.2.0 network (the inside network)? Typically this would be on your server on 192.168.2.1. I recommend dnsmasq for a simple DHCP setup like this. Secondly, don't forget to enable IP forwarding. See /etc/sysctl.conf, and uncomment this line: net.ipv4.ip_forward=1 Then run: sudo sysctl -p Without that you won't forward traffic from inside to outside. The last thing you need to do is NAT your inside traffic to your outside IP 192.168.1.20. Where to do this is up to you, but you need to run this iptables command at bootup: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE I wrote a blog post about doing this for virtual machines in Virtualbox. The setup should be the same for you, except you can ignore the Virtualbox and brctl stuff. Replace vnet0 with eth1, and ignore the bridge lines: http://www.tolaris.com/2009/03/05/using-host-networking-and-nat-with- virtualbox/ Regards, Tyler -- The map is not the territory. -- Alfred Korzybski -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/
Re: [ubuntu-uk] [OT] Basic network gateway server setup
Quoting Eddie B edd...@gmail.com: Hi everyone My hunch is that it's something to do with the routing tables, or maybe the DHCP on eth0, but I can't find a proper answer anywhere on Google. I was hoping to find some sort of sample config, as surely this is not an uncommon situation, but maybe I'm not searching for the right terms. Run this as root on the server: echo 1 /proc/sys/net/ipv4/ip_forward And see how you get on. M. -- Matthew Macdonald-Wallace matt...@truthisfreedom.org.uk http://www.truthisfreedom.org.uk/ -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/