I use an Ubuntu 14.04 32 bits
I have the following problem, I have to share Internet: 1 Internet Server (eth1) 1 Forward Internet with other network cards (this is the machine that need to configure - eth2) Pcs Customers.
The Internet comes with a network cable to the server and the other network card goes to a switch that distributes for micro clients.
Question is: how do I get the Internet a network card and distribute the other?
Thanks in advanced.
Please see my syslog
May 7 10:40:37 asterisk dhcpd: options subnet-mask
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: /etc/dhcp/dhcpd.conf line 6: semicolon expected.
May 7 10:40:37 asterisk dhcpd: options broadcast-address
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: /etc/dhcp/dhcpd.conf line 7: semicolon expected.
May 7 10:40:37 asterisk dhcpd: options routers
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: /etc/dhcp/dhcpd.conf line 8: semicolon expected.
May 7 10:40:37 asterisk dhcpd: options domain-name-servers
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: /etc/dhcp/dhcpd.conf line 9: semicolon expected.
May 7 10:40:37 asterisk dhcpd: options domain-name
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: Configuration file errors encountered -- exiting
May 7 10:40:37 asterisk dhcpd: Internet Systems Consortium DHCP Server 4.2.2
May 7 10:40:37 asterisk dhcpd: Copyright 2004-2011 Internet Systems Consortium.
May 7 10:40:37 asterisk dhcpd: All rights reserved.
May 7 10:40:37 asterisk dhcpd: For info, please visit https://www.isc.org/software/dhcp/
May 7 10:40:37 asterisk dhcpd: /etc/dhcp/dhcpd.conf line 5: semicolon expected.
May 7 10:40:37 asterisk dhcpd: options subnet-mask
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: /etc/dhcp/dhcpd.conf line 6: semicolon expected.
May 7 10:40:37 asterisk dhcpd: options broadcast-address
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: /etc/dhcp/dhcpd.conf line 7: semicolon expected.
May 7 10:40:37 asterisk dhcpd: options routers
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: /etc/dhcp/dhcpd.conf line 8: semicolon expected.
May 7 10:40:37 asterisk dhcpd: options domain-name-servers
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: /etc/dhcp/dhcpd.conf line 9: semicolon expected.
May 7 10:40:37 asterisk dhcpd: options domain-name
May 7 10:40:37 asterisk dhcpd: ^
May 7 10:40:37 asterisk dhcpd: Configuration file errors encountered -- exiting
May 7 10:40:49 asterisk dhcpd: Wrote 0 leases to leases file.
May 7 10:40:49 asterisk dhcpd:
May 7 10:40:49 asterisk dhcpd: No subnet declaration for eth2 (no IPv4 addresses).
May 7 10:40:49 asterisk dhcpd: ** Ignoring requests on eth2. If this is not what
May 7 10:40:49 asterisk dhcpd: you want, please write a subnet declaration
May 7 10:40:49 asterisk dhcpd: in your dhcpd.conf file for the network segment
May 7 10:40:49 asterisk dhcpd: to which interface eth2 is attached. **
May 7 10:40:49 asterisk dhcpd:
May 7 10:40:49 asterisk dhcpd:
May 7 10:40:49 asterisk dhcpd: Not configured to listen on any interfaces!
The first thing to do is do enable IP forwarding. This is done either by using
Then, we will add a rule telling to forward the traffic
and finally, we ask IPtables to masquerade
Edit 1
Install
configure
sudo nano -w /etc/dhcp/dhcpd.conf
restart service