CentOS5 - NAT problems

Issues related to configuring your network
Post Reply
Zxian
Posts: 6
Joined: 2007/05/11 23:35:46

CentOS5 - NAT problems

Post by Zxian » 2007/05/23 20:18:09

[b]Sorry... I posted this in the wrong section... mods please move this[/b]

I'm still new to all of this... so the more information you can throw my way, the better. :-)

I'm having a tough time figuring out what I need to do, partially due to my lack of knowledge with linux, and partially due to my lack of knowledge with networking.

I've got 20 systems, 1 head node and 19 slave nodes. The head node is setup as the main server for the whole lot, receiving a DHCP address from the internet, and giving DHCP to the internal network (on a separate NIC through a switch). The DHCP on the internal network works fine, and the head node can access the internet, but I'm trying to get the internal nodes access to the outside world (and vice versa). I've done a whole lot of reading up on NAT, but I'm not sure if I'm reading the wrong info or if I'm just doing things wrong.

I've read the information on [url=http://www.revsys.com/writings/quicktips/nat.html]this page[/url] for how to use iptables to do NAT for me, but it doesn't work. I think the rules have stuck, since this is the output from [b]iptables -L[/b]:

[code]Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination [/code]

Then again, I'm probably wrong, since I really don't understand what I'm doing.

[b]ifcfg-eth0[/b]
[code]# Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:19:B9:DD:B8:1B
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.0.1
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes[/code]

[b]ifcfg-eth1[/b]
[code]# Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet
DEVICE=eth1
BOOTPROTO=dhcp
HWADDR=00:19:B9:DD:B8:1D
ONBOOT=yes
TYPE=Ethernet[/code]

[b]dhcpd.conf[/b]
[code]#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
ddns-update-style interim;
ignore client-updates;

allow booting;
allow bootp;

class "pxeclients" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 192.168.0.1;
filename "/pxelinux.0";
}

subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.0.50 192.168.0.100;
default-lease-time 43200;
max-lease-time 86400;
option domain-name-servers 137.82.52.165, 137.82.52.170;

host slave1 {
hardware ethernet 00:15:C5:F1:BF:B3;
fixed-address 192.168.0.2;
}

<a whole bunch of statically assigned hosts>
}[/code]


I was using the DHCP server to network install the slave nodes, since they don't have CD-drives - that all worked fine (hooray for Kickstart files).

I'm just lost right now... I have no idea what to read for more information or what to do. Any and all help would be much appreciated.

Thanks in advance.

Zxian
Posts: 6
Joined: 2007/05/11 23:35:46

Re: CentOS5 - NAT problems

Post by Zxian » 2007/05/24 00:04:57

This seems to have fixed itself... I cleared out the iptables and followed the steps again and it worked. I took a while for the head node to show up in the routes table though. *shrugs*

abced123
Posts: 3
Joined: 2007/05/11 11:06:04

CentOS5 - NAT problems

Post by abced123 » 2007/06/05 01:25:12

You can try Firestarter ( google it ) , it s GUI based firewall/NAT ; very easy to use

Post Reply

Return to “CentOS 4 - Networking Support”