LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-03-2004, 01:22 PM   #1
zowey
Member
 
Registered: Feb 2004
Location: Croatia
Distribution: slackware 10.1, debian sarge, knoppix, ubuntu 7.04
Posts: 67

Rep: Reputation: 15
Question Configuration DHCP and Gateway on linux machine


I can ping to client computers, but they can't to my machine. My machine is running DHCP,DNS service and it is gateway. this is dhcpd.conf:
________________________________________
ddns-update-style none;
subnet 192.168.1.0 netmask 255.255.255.0 {
# default gateway
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;

option domain-name "homeland.net";
option domain-name-servers 192.168.1.1;

range dynamic-bootp 192.168.1.16 192.168.1.252;
default-lease-time 21600;
max-lease-time 43200;
}
____________
BTW my machine has ip address: 192.168.1.1
I normaly connect to internet but when I ping 192.168.1.1 from other computer which is running xp it says: Destination port unreachable.
why?
 
Old 04-03-2004, 02:04 PM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
so the clients can conect to the internet fine, but the problem is they can't ping the gateway, right???

sounds like the gateway's firewall rules may be blocking pings... what firewall are you using???

Last edited by win32sux; 04-03-2004 at 03:20 PM.
 
Old 04-03-2004, 02:34 PM   #3
zowey
Member
 
Registered: Feb 2004
Location: Croatia
Distribution: slackware 10.1, debian sarge, knoppix, ubuntu 7.04
Posts: 67

Original Poster
Rep: Reputation: 15
no, 'server' can connect to internet, but it can't share internet connection.
 
Old 04-03-2004, 03:03 PM   #4
zowey
Member
 
Registered: Feb 2004
Location: Croatia
Distribution: slackware 10.1, debian sarge, knoppix, ubuntu 7.04
Posts: 67

Original Poster
Rep: Reputation: 15
BTW

Oh my god, everything is working just fine! I have two clients connected to internet through my linux box. Thanks, it was problem in gateway...
I hope so configuration is not going to change after restarting OS if you have time for explain, I'm so curious, how it works:
iptables -A INPUT -p ICMP -s 0/0 --icmp-type 8 -j ACCEPT ???
 
Old 04-03-2004, 03:17 PM   #5
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
you could generate a very decent iptables gateway script using this:

http://easyfwgen.morizot.net/gen/


once the script is generated, copy and paste it into a text file, make it executable, and then run it as root to see if it works...

chmod a+x firewall-example.sh

./firewall-example.sh


when you know it works, then you can make it start automatically at boot time by adding it to your startup scripts...


you could also use shorewall if you want, but the web-generated iptables script method is less of a hassle to get going...

http://www.shorewall.net


and if you want something with a graphical interface:

http://firestarter.sourceforge.net/


though shorewall does have a webmin module that allows you to configure it through your browser:

http://www.webmin.com


oh, and if you wanna learn more about iptables and stuff, here's a good link to get started:

http://www.linuxguruz.com/iptables/

Last edited by win32sux; 04-03-2004 at 03:36 PM.
 
  


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
how to access internet from a linux machine via a linux machine as gateway b0nd Linux - Newbie 5 03-21-2005 12:59 PM
Downloading email with gateway linux machine colabus Linux - Newbie 1 06-20-2004 08:37 PM
linux gateway and DHCP weazy Linux - Networking 3 03-19-2003 05:30 PM
how do i use my linux machine to be a gateway for a windows machine? Sanjuro Linux - Networking 2 02-09-2002 05:29 AM
Setting up a Linux gateway machine inbar Linux - Networking 15 08-01-2001 11:08 AM


All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
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