Internet connection sharing in slackware - nic issue
Hello
I want to share my internet connection using slackware. Let me explain my configuration: I have two computers, the server with two nics (one connects to the adsl modem, and the other one to the other computer) and the client with one nick. On windows xp, they both have internet. Both computers have slackware 10.2 installed. When the server is on windows and the client is on slackware, the client has internet access. When the server is on slackware, it has internet access, but the client doesn't. (i use Roaring Penguin pppoe to connect to adsl in the server). How do i share my internet connection? Also, i have a Via VT6122 nic in the server that connects to my client computer. i installed the drivers, and on ifconfig, eth1 appeared, but now i rebooted, and i don't have eth1. (the server connects to internet using a 3com nic, which is seen as eth0) Here's the result on ifconfig: ----------------------------------------------------------------- eth0 Link encap:Ethernet HWaddr 00:50:DA:BF:B5:92 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1272 errors:0 dropped:0 overruns:0 frame:0 TX packets:1043 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:914520 (893.0 Kb) TX bytes:223434 (218.1 Kb) Interrupt:10 Base address:0xc800 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) ppp0 Link encap:Point-to-Point Protocol inet addr:190.49.176.50 P-t-P:200.51.241.231 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 RX packets:1232 errors:1270 dropped:0 overruns:0 frame:0 TX packets:1000 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:884950 (864.2 Kb) TX bytes:196643 (192.0 Kb) ----------------------------------------------------------------- How can i configure my eth1? I'd really appreciate the help Thanks Regards, Martin |
To share an Internet connection from one interface to another, you can use IPTables:
Code:
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE Now, you will have to configure IPs for both eth1, and the NIC in the Windows client. If you want to setup an IP for eth1, you can do so in /etc/rc.d/rc.inet1.conf. You could also run a DHCP server off of eth1, but that is a bit more involved, and probably not worth the time for a single client. |
Your actual external interface is ppp0 not eth0.
$IPTABLES -t nat -A POSTROUTING -o ppp0 -j MASQUERADE Lots of info on the web on iptables and configuring a firewall. There are also serveral GUI frontends for configuring iptables like firestarter. |
Thanks for your answers.
i tried with: iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE iptables --append FORWARD --in-interface eth1 -j ACCEPT and it didn't work. Any ideas? What should i do next? Ty! |
You need to fix the no eth1 problem.
Is the module loading? |
yes, i think so.... i run ifconfig eth1 and it gives me something like this:
eth0 Link encap:Ethernet HWaddr 00:50A:BF:B5:92 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1272 errors:0 dropped:0 overruns:0 frame:0 TX packets:1043 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:914520 (893.0 Kb) TX bytes:223434 (218.1 Kb) Interrupt:10 Base address:0xc800 (this was taken from the post above... this is for eth0, but i get the same result for eth1). so i believe it's working |
FYI eth0 is not assigned an IP address because you are using rp-pppoe.
eth1 is working but it is not being assigned an IP address. Configure it with static IP address. http://www.slackware.com/config/network.php |
All times are GMT -5. The time now is 02:38 PM. |