CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - Networking Support
  networking is hard...i think

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  mazin00
      mazin00
networking is hard...i think
#1
Newbie
Joined: 2009/11/7
From
Posts: 3
Hi everyone,

i am trying to acquire some networking skills.
I posses some basic Linux skills (9 years of user experience should taken care of that, i guess).
But with networking i have some problems. Please give me some tips, please not a solutions, otherwise i just copy paste and learn nothing. More of a advice where to look and for what.
I'm currently busy with following:
I am trying to set up centos machine as DHCP server for my internal (home) network of whole 2 computers :). well this machine will be much more then just dhcp, it's just at this particular moment i'm trying to get that working right.
So, i have a router from my ISP which originally had dhcp, but i switched that off, so i could set it up on centos machine (bbox from now on).
I realize that using bbox as a router would be easier, but i need modem to get adsl signal inside, and i don't have that.
So router will play role of a modem.
With this in mind i equipped bbox with 2 ethernet cards - eth0 and eth1.
eth0 is connected to router and eth1 will be where rest of my network computers will be connect to (strough very simple switch of course)

router has a static ip 10.0.0.1
bbox static 10.0.0.2 (on eth0)

goal for now is to get onto the internet with my desktop (amd64 from now).

following i have configured:

dhcp on bbox
ddns-update-style interim;
ignore client-updates;

subnet 10.50.0.0 netmask 255.255.255.0 {

# --- default gateway
	option routers			10.50.0.254;
	option subnet-mask		255.255.255.0;
	option domain-name		"mazin";
	option domain-name-servers	195.241.77.55, 195.241.77.58;

	option time-offset		-18000;	# Eastern Standard Time
	range dynamic-bootp 10.50.0.10 10.50.0.50;
	default-lease-time 21600;
	max-lease-time 43200;

}


eth0
# VIA Technologies, Inc. VT6102 [Rhine-II]
DEVICE=eth0
BOOTPROTO=none
IPADDR=10.0.0.2
NETMASK=255.0.0.0
HWADDR=00:40:63:dd:b8:f5
ONBOOT=yes
GATEWAY=10.0.0.1
TYPE=Ethernet


eth1
# Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:16:0a:1c:3d:7f
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=10.50.0.1
GATEWAY=10.0.0.2


resolve.conf (on bbox) contains dns from my ISP.

my amd64 receives ip address from bbox (10.0.0.48), but i cant go onto internet.
where and what i'm doing wrong?

PS rest of my network computers have automatic dhcp settings. so intention is that they aquier there ips and other settings from bbox

please help me out

thnx in advance
Posted on: 2009/11/7 18:51
Create PDF from Post Print
Top
  •  mazin00
      mazin00
Re: networking is hard...i think
#2
Newbie
Joined: 2009/11/7
From
Posts: 3
ok, i learned that i will have to use NAT to make traffic go from eth1 to eth0 and further.

i will try to look for simple nat how to.
Posted on: 2009/11/7 21:54
Create PDF from Post Print
Top
  •  mazin00
      mazin00
Re: networking is hard...i think
#3
Newbie
Joined: 2009/11/7
From
Posts: 3
i couldn't figure it out.... i really need your help with this.
Posted on: 2009/11/8 6:45
Create PDF from Post Print
Top
  •  mbwillma
      mbwillma
Re: networking is hard...i think
#4
Peeking in the Member Window
Joined: 2009/10/20
From Portland, OR
Posts: 17
Sounds like a pretty vanilla iptables setup would do what you want. Fix your DHCP config on the server so that all the clients point to it's internal interface as their default gateway, then modify the instructions here:

http://www.howtoforge.com/nat_iptables

To fit for your situation. Assuming a correct setup, that will force all traffic from your internal clients to external destinations through your server, merrily NAT'ng the traffic along the way.

--Matt
Posted on: 2009/11/10 22:32
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com