View previous topic :: View next topic |
Author |
Message |
kallius n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 04 Apr 2004 Posts: 1
|
Posted: Sun Apr 04, 2004 2:31 am Post subject: Sharing internet between Gentoo and WinME |
|
|
I'm trying to share my internet conection between a Gentoo desktop and a WinMe laptop, I have been trying to configure it using iptables and dhcpd folowing other posts in the forums to no result.
My configuration: Internet (from my cable modem) comes into eth0( configured as dhcp) , eth1 ( inet addr 192.168.0.1 Bcast 192.168.0.255 mask: 255.255.255.0) connects directly to my laptop.
As far as I know I'm supposed to have a dhcp server on eth1 and have ip do forwarding.
Thanks in advance. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kpack Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 29 Mar 2004 Posts: 137
|
Posted: Sun Apr 04, 2004 3:39 am Post subject: |
|
|
You don't need a dhcp server on eth1, especially not for a direct connection. Just configure your laptop with a static address on 192.168.0, ie 192.168.0.2.
# Masquerade out eth0
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
That's pretty much it.
Add the following rules to enable stateful packet filtering on the internet interface:
# Disallow NEW and INVALID incoming or forwarded packets from eth0.
iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|