LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-30-2005, 05:37 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: Chicago
Distribution: CentOS
Posts: 1,266

Rep: Reputation: 53
trying to setup linux firewal/dhcp server but its not sharing the internet connection


I am trying to setup linux firewall/dhcp server but its not assign ips

Here is my server
Firewall/DHCP Server with 2 NICS
NIC 1 eth0: Cable from dsl router to nic1. Public IP from my dsl provider, this works ok and I can ping out
NIC 2 eth1: Cable From switch to nic2 Private IP 10.10.0.1, I can ping 10.10.0.1 ok

Computer 1:
cable from switch to nic on computer.

I have dhcpd.conf set to us 10.10.0.128-254 for ips and to use 10.10.0.1 as the gateway.

Computer 1 is set to automatically assign an ip to itself, it picks
IP: 10.10.0.254
Subnet: 255.255.255.0
Gateway: 10.10.0.1
It can ping 10.10.0.1 and it can ping the public IP, but it cannont ping yahoo.com

I tried changing the IP of eth1 on the server to 10.10.0.11 and computer 1 can ping it put it can't ping the default gateway of 10.10.0.1

Should the IP of NIC1 on the server be 10.10.0.1 or 10.10.0.11?

I also tried:
route add -host 255.255.255.255 dev eth1
but still couldnt ping out

Why arent I able to ping outsite the network(yahoo.com)?
 
Old 04-30-2005, 05:49 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
What firewall/iptables rules have you set? You'll need to do NAT/Masquerading to get your gatway box to forward packets to the net. http://www.ibiblio.org/pub/Linux/doc...TO-html.tar.gz http://www.ibiblio.org/mdw/HOWTO/IP-Masquerade-HOWTO/

Last edited by Andrew Benton; 04-30-2005 at 05:50 PM.
 
Old 04-30-2005, 07:07 PM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: Chicago
Distribution: CentOS
Posts: 1,266

Original Poster
Rep: Reputation: 53
Thanks that worked, but it is not resolving domains,
It can't ping yahoo.com put it can ping 216.109.112.135

why wont it resolve domains names?

iptables are set to resolve DNS:
#Accept DNS, cause it's warm and friendly
iptables -A INPUT -p udp --source-port 53 -j ACCEPT
iptables -A INPUT -p udp --destination-port 53 -j ACCEPT

They firewall can resolve domains ok.

Got any tips?
 
Old 04-30-2005, 07:18 PM   #4
abefroman
Senior Member
 
Registered: Feb 2004
Location: Chicago
Distribution: CentOS
Posts: 1,266

Original Poster
Rep: Reputation: 53
The actual error I get when tryiing to do an nslookup on computer1 is:
C:\Documents and Settings\Doug>nslookup yahoo.com
*** Can't find server name for address 10.10.0.1: No response from server
*** Default servers are not available
Server: UnKnown
Address: 10.10.0.1

*** UnKnown can't find yahoo.com: No response from server

C:\Documents and Settings\Doug>
 
Old 05-01-2005, 04:39 AM   #5
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Can you ping numerical addresses from computer1? What does it say in /etc/resolv.conf on computer1? it should look something like this
nameserver aaa.bbb.ccc.ddd

where aaa.bbb.ccc.ddd is the numerical address of your ISP's nameserver

Oh, hang on, that C:\Documents and Settings\ looks suspicious, you didn't say computer1 has gone over to the dark side. I don't know how to set it up on windows. It'll be on the control panel, in network connections?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet connection sharing - Setup Dobly Linux - Networking 1 04-07-2004 09:26 PM
Internet connection sharing and dhcp SolidSnake Linux - Networking 26 12-02-2003 10:23 AM
Internet Sharing with DHCP connection to the Net Earp Linux - Networking 1 06-15-2003 02:57 PM
How Can I Make Internet Connection Sharing Server With RedHat Linux 7.3? SurfTurtle Linux - Networking 6 10-20-2002 01:01 AM
Sharing an internet connection with a Linux client through a 2000 server gateway thuan Linux - Networking 1 08-02-2001 01:55 PM


All times are GMT -5. The time now is 02:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration