Debian: Home router / NAT / Firewall
I've followed this guide http://www.cyberdogtech.com/firewall...php?page=inter till setting up DNS (I've not done that yet).
My cabling goes like this: --------[VDSL modem]------[home router PC]--[D-link ethernet switch]--[another PC] All cables are the same RJ-45. My connection is PPPoE. There's two NICs in my router pc. My /etc/network/interfaces looks like follows Code:
auto lo Now /etc/init.d/networking restart brings up my network. I'm sorry I can't at the moment paste my ifconfig's output here, but there is one pppX interface and eth0 and eth1, one having IP 192.168.1.1. In adsl-setup I tried both setting firewall 0 (not at all) and 1 (desktop usage). I thought 0 would be suitable because of explicit shorewall configuring. Should I have some special settings on my client Gentoo machine which is connected to the switch? My PPPoE settings are set according to http://gentoo-wiki.com/HOWTO_Connect_using_PPPoE. I do not use rp-pppoe but instead of that /etc/conf.d/net & /etc/init.d/net.ppp0 thing as shown in HOWTO. This is from my client computer: Code:
config_eth0=( "dhcp" ) --- Thanks. |
can [home router PC] connect to the internet?
|
Quote:
|
Things I would check, pretty much in order:
1. You say you have internet at the router, so that's good. 2. Make sure you are using "straight-through" ethernet cables and not "cross-over" cables. The latter are for connecting NIC-to-NIC, the former for NIC-to-switch. 3. You need to have your IP configured in the Gentoo box. If you have trouble with getting DHCP to work, you can just set it up manually, something like: 'ifconfig eth0 netmask 255.255.255.0 broadcast 192.168.1.255 192.168.1.2'. That's for the Gentoo box. You should then be able to do 'ifconfig eth0' to check it. If the IP takes hold, but not broadcast, just do the first command again. Done right, you should be able to ping the router: 'ping 192.168.1.1'. If no joy, there's no need to go forward. If doing 'ifconfig eth0' says that eth0 is not found or whatever, you need to check that you have loaded the right driver for the NIC. 4. To share Internet, you *must* have your firewall configured for masquerading (NAT). A fully open firewall will connect the router to the world, but the Gentoo box won't get through. I still haven't figured it out, but what got me through was a yoLinux tutorial and also the Firestarter firewall program. Almost forgot to mention routing: the Gentoo box must have the router NIC (192.168.1.1) as the default route or gateway. |
try
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward Code:
68.230.242.30 |
All times are GMT -5. The time now is 02:36 PM. |