LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Interesting Slack and Mac networking question (https://www.linuxquestions.org/questions/slackware-14/interesting-slack-and-mac-networking-question-548380/)

spaceballs 04-23-2007 04:13 PM

Interesting Slack and Mac networking question
 
I live in the sticks, and I need help with an interesting problem. I think that it is possible, and I hope that some of you will point me in the right direction. I am on dial up, and it is the only internet service that I can get that is too reliable. My brand new Mac Mini doesn't have a modem.

I know this is possible, but I would like to dial up with my Dell XPS m1210, and then have it serve data and be the internet gateway for the Mac. I would think that I could run a cable between the two NICs on each of the computers. Is this possible? Where could I look for more information? Do I need more pieces than this? Would the cable need to be a crossover cable?

Thanks.

MS3FGX 04-23-2007 05:14 PM

Yes, you simply need to connect the two computers with a cross-over Ethernet cable, and then setup the actual networking aspect. Actually, as far as I know all Macs since the G3's have had auto-sensing network cards, so it should be able to work with either a cross-over or a patch cable, as the Mac's network card will adjust accordingly.

Give both machines static IPs (on the Slackware machine, only the Ethernet card connected to the Mac needs the static IP), make sure they can ping each other over the network, and then add add the following to your /etc/rc.d/rc.local file:

Code:

iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT

(You might need to adjust the interface names there)

Then make /etc/rc.d/rc.ip_forwarding executable with the command:

Code:

chmod +x /etc/rc.d/rc.ip_forward
On boot, your machine should setup the NAT between your dial up connection and Ethernet card, and then enable IP forwarding in the kernel. As long as you have the Mac setup with proper TCP/IP settings, you would be able to connect to the Internet through the Slackware machine.

spaceballs 04-24-2007 10:05 PM

I may need some more help. Is this possible to set up so that both computers can share the ppp0 connection at the same time?

MS3FGX 04-24-2007 10:38 PM

Yes, they would both be able to use the ppp connection at the same time. The Slackware machine would have to be connected before hand though, you won't be able to initiate dialing from the Mac.


All times are GMT -5. The time now is 02:24 PM.