connecting a linux pc and an apple mac

connecting a linux pc and an apple mac

Post by Tim Van der Linde » Wed, 21 Nov 2001 21:10:00



I am trying to connect an apple mac to a linux pc which is connected to
the internet via an ADSL line. My ultimate goal is using the pc as a
gateway so they can share this connection. But I am already in trouble
making the two speak to each other.

My problem is the following: the two machines are connected via
ethernet, the linux box is 192.168.0.1, the mac is 192.168.0.2. They can
ping each other, but the mac fails to connect to any service I try to
provide on the pc. For instance, when I try to ftp the linux box from
the mac, the linux box does not react at all; logging packets that
arrive from the mac gives

Nov 20 12:42:25 linux kernel: IN=eth0 OUT=
MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
DST=192.168.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=255 ID=38775 DF PROTO=ICMP
TYPE=0 CODE=0 ID=60677 SEQ=2
Nov 20 12:43:01 linux kernel: IN=eth0 OUT=
MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
DST=192.168.0.1 LEN=48 TOS=0x00 PREC=0x00 TTL=255 ID=38776 DF PROTO=TCP
SPT=2050 DPT=21 WINDOW=16616 RES=0x00 SYN URGP=0
Nov 20 12:43:07 linux kernel: IN=eth0 OUT=
MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
DST=192.168.0.1 LEN=48 TOS=0x00 PREC=0x00 TTL=255 ID=39043 DF PROTO=TCP
SPT=2050 DPT=21 WINDOW=16616 RES=0x00 SYN URGP=0
Nov 20 12:43:21 linux kernel: IN=eth0 OUT=
MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
DST=192.168.0.1 LEN=48 TOS=0x00 PREC=0x00 TTL=255 ID=39044 DF PROTO=TCP
SPT=2050 DPT=21 WINDOW=16616 RES=0x00 SYN URGP=0
etc.

which makes me think the mac does try to connect. On the other hand,
doing
ftp 192.168.0.1 on the pc works fine.

Thinking appletalk would be a more "natural" service to provide to a
mac, I installed netatalk on my linux box. The the same applies here: in
the chooser, the mac does not see the linux box, and when I explicitly
give in the address 192.168.0.1, it tries to connect but fails in much
the same way as ftp fails.

I do not know what to do next... Has any of you got a clue?

Some more information on my configuration: the linux box runs suse 7.2
with a patched (I applied the PPPoATM patch) 2.4.4 kernel. The output of
some commands:

#ifconfig
eth0      Link encap:Ethernet  HWaddr A5:A5:A5:A5:A5:A5
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          EtherTalk Phase 2 addr:65280/251
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:2520 (2.4 Kb)  TX bytes:3762 (3.6 Kb)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          EtherTalk Phase 2 addr:0/0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:732 errors:0 dropped:0 overruns:0 frame:0
          TX packets:732 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:51817 (50.6 Kb)  TX bytes:51817 (50.6 Kb)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:217.136.22.178  P-t-P:217.136.16.1
Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:573 errors:0 dropped:0 overruns:0 frame:0
          TX packets:647 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:143310 (139.9 Kb)  TX bytes:41317 (40.3 Kb)

#netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
217.136.16.1    0.0.0.0         255.255.255.255 UH       40 0          0
ppp0
192.168.0.0     0.0.0.0         255.255.255.0   U        40 0          0
eth0
0.0.0.0         217.136.16.1    0.0.0.0         UG       40 0          0
ppp0

#arp -n
Address                  HWtype  HWaddress           Flags
Mask            Iface
192.168.0.2              ether   00:50:E4:80:30:20  
C                     eth0

#iptables --list -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
LOG        all  --  192.168.0.2          0.0.0.0/0          LOG flags 0
level 4

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
LOG        all  --  0.0.0.0/0            192.168.0.2        LOG flags 0
level 4

The file hosts.allow contains only ALL:ALL, and hosts.deny is empty.

The mac's TCP/IP control panel is set up as follows:

IP Address: 192.168.0.2
Subnet mask: 255.255.255.0
Router address: 192.168.0.1

All the other boxes are empty.

 
 
 

connecting a linux pc and an apple mac

Post by James Knot » Wed, 21 Nov 2001 22:21:11


You don't say what distro you're running, but on some, you have to
configure the built in firewall to allow the various services.


Quote:> I am trying to connect an apple mac to a linux pc which is connected
> to the internet via an ADSL line. My ultimate goal is using the pc as
> a gateway so they can share this connection. But I am already in
> trouble making the two speak to each other.

> My problem is the following: the two machines are connected via
> ethernet, the linux box is 192.168.0.1, the mac is 192.168.0.2. They
> can ping each other, but the mac fails to connect to any service I try
> to provide on the pc. For instance, when I try to ftp the linux box
> from the mac, the linux box does not react at all; logging packets
> that arrive from the mac gives

> Nov 20 12:42:25 linux kernel: IN=eth0 OUT=
> MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
> DST=192.168.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=255 ID=38775 DF
> PROTO=ICMP TYPE=0 CODE=0 ID=60677 SEQ=2
> Nov 20 12:43:01 linux kernel: IN=eth0 OUT=
> MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
> DST=192.168.0.1 LEN=48 TOS=0x00 PREC=0x00 TTL=255 ID=38776 DF
> PROTO=TCP SPT=2050 DPT=21 WINDOW=16616 RES=0x00 SYN URGP=0
> Nov 20 12:43:07 linux kernel: IN=eth0 OUT=
> MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
> DST=192.168.0.1 LEN=48 TOS=0x00 PREC=0x00 TTL=255 ID=39043 DF
> PROTO=TCP SPT=2050 DPT=21 WINDOW=16616 RES=0x00 SYN URGP=0
> Nov 20 12:43:21 linux kernel: IN=eth0 OUT=
> MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
> DST=192.168.0.1 LEN=48 TOS=0x00 PREC=0x00 TTL=255 ID=39044 DF
> PROTO=TCP SPT=2050 DPT=21 WINDOW=16616 RES=0x00 SYN URGP=0
> etc.

> which makes me think the mac does try to connect. On the other hand,
> doing
> ftp 192.168.0.1 on the pc works fine.

> Thinking appletalk would be a more "natural" service to provide to a
> mac, I installed netatalk on my linux box. The the same applies here:
> in the chooser, the mac does not see the linux box, and when I
> explicitly give in the address 192.168.0.1, it tries to connect but
> fails in much the same way as ftp fails.

> I do not know what to do next... Has any of you got a clue?

> Some more information on my configuration: the linux box runs suse 7.2
> with a patched (I applied the PPPoATM patch) 2.4.4 kernel. The output
> of some commands:

> #ifconfig
> eth0      Link encap:Ethernet  HWaddr A5:A5:A5:A5:A5:A5
>           inet addr:192.168.0.1  Bcast:192.168.0.255
>           Mask:255.255.255.0 EtherTalk Phase 2 addr:65280/251
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:34 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0
>           RX bytes:2520 (2.4 Kb)  TX bytes:3762 (3.6 Kb)

> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           EtherTalk Phase 2 addr:0/0
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:732 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:732 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0
>           RX bytes:51817 (50.6 Kb)  TX bytes:51817 (50.6 Kb)

> ppp0      Link encap:Point-to-Point Protocol
>           inet addr:217.136.22.178  P-t-P:217.136.16.1
> Mask:255.255.255.255
>           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
>           RX packets:573 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:647 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0
>           RX bytes:143310 (139.9 Kb)  TX bytes:41317 (40.3 Kb)

> #netstat -rn
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window
> irtt Iface
> 217.136.16.1    0.0.0.0         255.255.255.255 UH       40 0        
> 0 ppp0
> 192.168.0.0     0.0.0.0         255.255.255.0   U        40 0        
> 0 eth0
> 0.0.0.0         217.136.16.1    0.0.0.0         UG       40 0        
> 0 ppp0

> #arp -n
> Address                  HWtype  HWaddress           Flags
> Mask            Iface
> 192.168.0.2              ether   00:50:E4:80:30:20
> C                     eth0

> #iptables --list -n
> Chain INPUT (policy ACCEPT)
> target     prot opt source               destination
> LOG        all  --  192.168.0.2          0.0.0.0/0          LOG flags
> 0 level 4

> Chain FORWARD (policy ACCEPT)
> target     prot opt source               destination

> Chain OUTPUT (policy ACCEPT)
> target     prot opt source               destination
> LOG        all  --  0.0.0.0/0            192.168.0.2        LOG flags
> 0 level 4

> The file hosts.allow contains only ALL:ALL, and hosts.deny is empty.

> The mac's TCP/IP control panel is set up as follows:

> IP Address: 192.168.0.2
> Subnet mask: 255.255.255.0
> Router address: 192.168.0.1

> All the other boxes are empty.

--


james.knott.

 
 
 

connecting a linux pc and an apple mac

Post by Tim Van der Linde » Thu, 22 Nov 2001 03:02:47


I use SuSE Linux 7.2 and disabled the firewall. I can use ftp from a
computer on the internet (thus, via ppp0) by telneting to it and then
ftping back to my linux pc.

> You don't say what distro you're running, but on some, you have to
> configure the built in firewall to allow the various services.


> > I am trying to connect an apple mac to a linux pc which is connected
> > to the internet via an ADSL line. My ultimate goal is using the pc as
> > a gateway so they can share this connection. But I am already in
> > trouble making the two speak to each other.

> > My problem is the following: the two machines are connected via
> > ethernet, the linux box is 192.168.0.1, the mac is 192.168.0.2. They
> > can ping each other, but the mac fails to connect to any service I try
> > to provide on the pc. For instance, when I try to ftp the linux box
> > from the mac, the linux box does not react at all; logging packets
> > that arrive from the mac gives

> > Nov 20 12:42:25 linux kernel: IN=eth0 OUT=
> > MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
> > DST=192.168.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=255 ID=38775 DF
> > PROTO=ICMP TYPE=0 CODE=0 ID=60677 SEQ=2
> > Nov 20 12:43:01 linux kernel: IN=eth0 OUT=
> > MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
> > DST=192.168.0.1 LEN=48 TOS=0x00 PREC=0x00 TTL=255 ID=38776 DF
> > PROTO=TCP SPT=2050 DPT=21 WINDOW=16616 RES=0x00 SYN URGP=0
> > Nov 20 12:43:07 linux kernel: IN=eth0 OUT=
> > MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
> > DST=192.168.0.1 LEN=48 TOS=0x00 PREC=0x00 TTL=255 ID=39043 DF
> > PROTO=TCP SPT=2050 DPT=21 WINDOW=16616 RES=0x00 SYN URGP=0
> > Nov 20 12:43:21 linux kernel: IN=eth0 OUT=
> > MAC=a5:a5:a5:a5:a5:a5:00:50:e4:80:30:20:08:00 SRC=192.168.0.2
> > DST=192.168.0.1 LEN=48 TOS=0x00 PREC=0x00 TTL=255 ID=39044 DF
> > PROTO=TCP SPT=2050 DPT=21 WINDOW=16616 RES=0x00 SYN URGP=0
> > etc.

> > which makes me think the mac does try to connect. On the other hand,
> > doing
> > ftp 192.168.0.1 on the pc works fine.

> > Thinking appletalk would be a more "natural" service to provide to a
> > mac, I installed netatalk on my linux box. The the same applies here:
> > in the chooser, the mac does not see the linux box, and when I
> > explicitly give in the address 192.168.0.1, it tries to connect but
> > fails in much the same way as ftp fails.

> > I do not know what to do next... Has any of you got a clue?

> > Some more information on my configuration: the linux box runs suse 7.2
> > with a patched (I applied the PPPoATM patch) 2.4.4 kernel. The output
> > of some commands:

> > #ifconfig
> > eth0      Link encap:Ethernet  HWaddr A5:A5:A5:A5:A5:A5
> >           inet addr:192.168.0.1  Bcast:192.168.0.255
> >           Mask:255.255.255.0 EtherTalk Phase 2 addr:65280/251
> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >           RX packets:34 errors:0 dropped:0 overruns:0 frame:0
> >           TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
> >           collisions:0
> >           RX bytes:2520 (2.4 Kb)  TX bytes:3762 (3.6 Kb)

> > lo        Link encap:Local Loopback
> >           inet addr:127.0.0.1  Mask:255.0.0.0
> >           EtherTalk Phase 2 addr:0/0
> >           UP LOOPBACK RUNNING  MTU:16436  Metric:1
> >           RX packets:732 errors:0 dropped:0 overruns:0 frame:0
> >           TX packets:732 errors:0 dropped:0 overruns:0 carrier:0
> >           collisions:0
> >           RX bytes:51817 (50.6 Kb)  TX bytes:51817 (50.6 Kb)

> > ppp0      Link encap:Point-to-Point Protocol
> >           inet addr:217.136.22.178  P-t-P:217.136.16.1
> > Mask:255.255.255.255
> >           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
> >           RX packets:573 errors:0 dropped:0 overruns:0 frame:0
> >           TX packets:647 errors:0 dropped:0 overruns:0 carrier:0
> >           collisions:0
> >           RX bytes:143310 (139.9 Kb)  TX bytes:41317 (40.3 Kb)

> > #netstat -rn
> > Kernel IP routing table
> > Destination     Gateway         Genmask         Flags   MSS Window
> > irtt Iface
> > 217.136.16.1    0.0.0.0         255.255.255.255 UH       40 0
> > 0 ppp0
> > 192.168.0.0     0.0.0.0         255.255.255.0   U        40 0
> > 0 eth0
> > 0.0.0.0         217.136.16.1    0.0.0.0         UG       40 0
> > 0 ppp0

> > #arp -n
> > Address                  HWtype  HWaddress           Flags
> > Mask            Iface
> > 192.168.0.2              ether   00:50:E4:80:30:20
> > C                     eth0

> > #iptables --list -n
> > Chain INPUT (policy ACCEPT)
> > target     prot opt source               destination
> > LOG        all  --  192.168.0.2          0.0.0.0/0          LOG flags
> > 0 level 4

> > Chain FORWARD (policy ACCEPT)
> > target     prot opt source               destination

> > Chain OUTPUT (policy ACCEPT)
> > target     prot opt source               destination
> > LOG        all  --  0.0.0.0/0            192.168.0.2        LOG flags
> > 0 level 4

> > The file hosts.allow contains only ALL:ALL, and hosts.deny is empty.

> > The mac's TCP/IP control panel is set up as follows:

> > IP Address: 192.168.0.2
> > Subnet mask: 255.255.255.0
> > Router address: 192.168.0.1

> > All the other boxes are empty.

> --


> james.knott.

 
 
 

connecting a linux pc and an apple mac

Post by Mark Cannat » Sat, 24 Nov 2001 22:17:50


In the Mac's TCP/IP control panel make sure "Connect via:" is set to
ethernet and "Configure:" is set to manually. Under "Name server addr.:"
enter the ip number of your name server. In your case I think it is
134.58.40.4 . In the "Search domains:" box enter the domains to search I
don't know what you would enter here, either ac.be or .be .

Take care,
Mark

> > > The mac's TCP/IP control panel is set up as follows:

> > > IP Address: 192.168.0.2
> > > Subnet mask: 255.255.255.0
> > > Router address: 192.168.0.1

> > > All the other boxes are empty.

> > --


> > james.knott.