View previous topic :: View next topic |
Author |
Message |
zion1459 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 12 Mar 2003 Posts: 146
|
Posted: Wed May 14, 2003 3:05 pm Post subject: iptables+dhcpd help needed plz :S |
|
|
Hi.
I'm trying to setup Internet sharing. here's my setup so far.
eth0: connected to the internet using dhcpcd.
eth1: IP: 192.168.0.1
I've installed dhcpd and it's giving all LAN computer connecting to eth1 an IP address.. this part works great.
I've also installed iptables and tried doing a:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables works flawlessly but my windoze box can't get on the net.
the windoze box gets and IP as it should but no Internet. I wanted to make my internet sharing so that the client simply had to get their IP, dns, etc via dhcp and then Internet should work without proxy settings.. the typical "plugin the cable and u're online" setup...
what have I done wrong?
regards zion1459 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
grooveman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/11473736443e5a75084276d.jpg)
Joined: 24 Feb 2003 Posts: 1217
|
Posted: Thu May 15, 2003 1:54 pm Post subject: |
|
|
Can your windows machine ping your linux machine? (and vice-versa).
Does your dhcp server pass along the dns server information to your windows box? Trying pinging an ip rather than a DNS name.
Are you sure that eth0 is the proper nic? This should be the one connected to the internet...
Have you double-checked to make sure your linux box has connectivity to the internet?
BTW -- I certainly hope you have some more rule sets in your iptables script to protect your network. If that is your only ruleset, then your are inviting trouble.
Sorry if some of these questions seem dumb, but it is best to start simple.
Anyway, I hope some of it was helpful.
Chris _________________ To look without without looking within is like looking without without looking at all. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
krusty_ar Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_krusty.gif)
Joined: 03 Oct 2002 Posts: 560 Location: Rosario, Argentina
|
Posted: Thu May 15, 2003 2:16 pm Post subject: |
|
|
You need to set the default gateway via dhcp in your windoze, to check if you are already doing this, use winipcfg (win9x) or ipconfig (NT). you can set it manually in win9x via the network icon in the desktop at least in 9x. _________________ I am Beta, don't expect correct behaviour from me.
Take part of the adopt an unaswered post initiative |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
splooge l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 30 Aug 2002 Posts: 636
|
Posted: Thu May 15, 2003 10:25 pm Post subject: |
|
|
My first question when anyone has this sort of problem:
Did you do a:
echo 1 > /proc/sys/net/ipv4/ip_forward
? _________________ http://get.a.clue.de |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
grooveman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/11473736443e5a75084276d.jpg)
Joined: 24 Feb 2003 Posts: 1217
|
Posted: Thu May 15, 2003 11:06 pm Post subject: |
|
|
Yeah... Good point splooge! _________________ To look without without looking within is like looking without without looking at all. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
zion1459 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 12 Mar 2003 Posts: 146
|
Posted: Fri May 16, 2003 1:54 pm Post subject: |
|
|
yea I've done the "echo "1" > ...."
I think the problem is with the dhcp server.. how do I get it to pass along the information from the dhcpcd which get the internet dns servers? or do I simply have to type the dns's in manually? (this would suck since my ISP sometimes changes the ip on the dns servers.. don't ask me why... ) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Buzzz n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/19819038983f4c4d56e7365.jpg)
Joined: 17 Apr 2002 Posts: 63 Location: Enschede, The Netherlands
|
Posted: Sat May 17, 2003 8:49 pm Post subject: |
|
|
I would say, install dnsmasq and use your router in the rest of the network as dns server.
do a
emerge dnsmasq
/etc/init.d/dnsmasq start
rc-update add dnsmasq default
And add the following line to your /etc/dhcp/dhcpd.conf
option domain-name-servers 192.168.1.1;
dnsmasq automatically uses your /etc/resolv.conf to forward the dns requests to and also adds your /etc/hosts to the dns. Just perfect for your use i think _________________ There are no stupid questions, but there are a lot of inquisitive idiots |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
zion1459 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 12 Mar 2003 Posts: 146
|
Posted: Sun May 18, 2003 11:29 am Post subject: |
|
|
Buzz: yea it did the trick j33t.. now I got Internet for my LAN
thx all
oh btw. grooveman said something about security... now if some1 would wanna mess with my system they would have to be on my LAN right? I mean, I don't wanna install a firewall then since I 0wn all the boxes on my LAN... right? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
x3m.seth n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 15 Dec 2003 Posts: 3
|
Posted: Wed Dec 24, 2003 1:31 am Post subject: |
|
|
buzz or anyone... i'd realize this is an old topic, but everything goes well... from the other machine i do ping google.com and it resolves but seems can't reach the host.......
i guess it's something with my routing tables?? any help here???
my internet provider gave me a dynamic ip, and i have a network card on 192.168.0.1 wich i have installed gentoo and dnsmasq to be the dns resolver... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|