Networking Forums

Networking Forums > Computer Networking > Linux Networking > ADSL sharing

Reply
 
 
qetoom@gmail.com
Guest
Posts: n/a

 
      07-30-2005, 03:23 PM
I have a linux box (b1) connected to an ethernet adsl modem (rth0) and
also
connected to a windows (b2) box through a wireless connection (ra0).

although b1 is the default gateway and dns for b2, b2 can't access the
internet (I'm using 191.168.0.0 as my local newtwork address is this
wrong)

notes:
b2 can ping b1. (and vice verse)
ip forwording is enabled on b1.
the adsl connection is the default gateway on b1.

I've tried
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
and I didn't work


Any help getting b2 to connect the net through b1?


results from running ifconfig:
dsl0 Link encap:Point-to-Point Protocol
inet addr:xxxxxxxxxx P-t-P:xxxxxxxxxxx Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1454 Metric:1
RX packets:10951 errors:0 dropped:0 overruns:0 frame:0
TX packets:14264 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1836039 (1.7 Mb) TX bytes:1992594 (1.9 Mb)

eth0 Link encap:Ethernet HWaddr 00:30:4F:07:19:40
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::230:4fff:fe07:1940/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:94642 errors:0 dropped:0 overruns:0 frame:0
TX packets:84924 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:86135311 (82.1 Mb) TX bytes:9989004 (9.5 Mb)
Interrupt:11 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:545 errors:0 dropped:0 overruns:0 frame:0
TX packets:545 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:43668 (42.6 Kb) TX bytes:43668 (42.6 Kb)

ra0 Link encap:Ethernet HWaddr 00:11:09:29:46:CE
inet addr:191.168.0.5 Bcast:191.168.255.255
Mask:255.255.0.0
inet6 addr: fe80::211:9ff:fe29:46ce/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1911 errors:0 dropped:0 overruns:0 frame:0
TX packets:366 errors:1 dropped:1 overruns:0 carrier:0
collisions:20 txqueuelen:1000
RX bytes:199427 (194.7 Kb) TX bytes:42512 (41.5 Kb)
Interrupt:10

 
Reply With Quote
 
 
 
 
Eric Teuber
Guest
Posts: n/a

 
      07-30-2005, 05:24 PM
(E-Mail Removed) wrote:
> I have a linux box (b1) connected to an ethernet adsl modem (rth0) and
> also
> connected to a windows (b2) box through a wireless connection (ra0).
>
> although b1 is the default gateway and dns for b2, b2 can't access the
> internet (I'm using 191.168.0.0 as my local newtwork address is this
> wrong)


192.168.0.0 is reserved for private Networks.

>
> I've tried
> iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
> and I didn't work


You also need to setup a FORWARD rule to forward the traffic coming from
your b2 box.

iptables -A FORWARD -i ra0 -j ACCEPT

What is the dsl0 device for? You may need to use this device in your
MASQUERADE rule, if your b1 box is dialing in, but i am not sure about that.

Eric
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      07-30-2005, 06:16 PM
(E-Mail Removed) wrote:
> I have a linux box (b1) connected to an ethernet adsl modem
> (rth0) and also connected to a windows (b2) box through a wireless
> connection (ra0).


> although b1 is the default gateway and dns for b2, b2 can't access the
> internet (I'm using 191.168.0.0 as my local newtwork address is this
> wrong)


Is that a question? If so then yes, it's wrong, although you may get
away with it since you intend to use masquerading. Why not use one
of the private IP address ranges?

> notes:
> b2 can ping b1. (and vice verse)
> ip forwording is enabled on b1.
> the adsl connection is the default gateway on b1.


> I've tried
> iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
> and I didn't work


Of course not. The masqueraded interface has to be the PPP interface,
which is here renamed from ppp0 to dsl0 (obfuscation introduced by your
distribution (or perhaps kppp?) :P).

> Any help getting b2 to connect the net through b1?


Since there it appears there is only one host behind the ADSL connection
host the easiest thing to do would be to set the MTU of the Ethernet
interface on b2 to 1454. Otherwise see section TCPMSS in man iptables.

> results from running ifconfig:
> dsl0 Link encap:Point-to-Point Protocol
> inet addr:xxxxxxxxxx P-t-P:xxxxxxxxxxx Mask:255.255.255.255
> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1454 Metric:1
> RX packets:10951 errors:0 dropped:0 overruns:0 frame:0
> TX packets:14264 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:3
> RX bytes:1836039 (1.7 Mb) TX bytes:1992594 (1.9 Mb)


> eth0 Link encap:Ethernet HWaddr 00:30:4F:07:19:40
> inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
> inet6 addr: fe80::230:4fff:fe07:1940/64 Scope:Link
> UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:94642 errors:0 dropped:0 overruns:0 frame:0
> TX packets:84924 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:86135311 (82.1 Mb) TX bytes:9989004 (9.5 Mb)
> Interrupt:11 Base address:0x2000


> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> inet6 addr: ::1/128 Scope:Host
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:545 errors:0 dropped:0 overruns:0 frame:0
> TX packets:545 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:43668 (42.6 Kb) TX bytes:43668 (42.6 Kb)


> ra0 Link encap:Ethernet HWaddr 00:11:09:29:46:CE
> inet addr:191.168.0.5 Bcast:191.168.255.255
> Mask:255.255.0.0
> inet6 addr: fe80::211:9ff:fe29:46ce/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:1911 errors:0 dropped:0 overruns:0 frame:0
> TX packets:366 errors:1 dropped:1 overruns:0 carrier:0
> collisions:20 txqueuelen:1000
> RX bytes:199427 (194.7 Kb) TX bytes:42512 (41.5 Kb)
> Interrupt:10


--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
/* The signal-to-noise ratio is too low in many [news] groups to make
* them good candidates for archiving.
* --- Mike Moraes, Answers to FAQs about Usenet */
 
Reply With Quote
 
Eric Teuber
Guest
Posts: n/a

 
      08-01-2005, 08:26 PM
Clifford Kite wrote:
> (E-Mail Removed) wrote:
>
>>I have a linux box (b1) connected to an ethernet adsl modem
>>(rth0) and also connected to a windows (b2) box through a wireless
>>connection (ra0).

>
>
>>although b1 is the default gateway and dns for b2, b2 can't access the
>>internet (I'm using 191.168.0.0 as my local newtwork address is this
>>wrong)

>
>
> Is that a question? If so then yes, it's wrong, although you may get
> away with it since you intend to use masquerading. Why not use one
> of the private IP address ranges?
>
>
>>notes:
>>b2 can ping b1. (and vice verse)
>>ip forwording is enabled on b1.
>>the adsl connection is the default gateway on b1.

>
>
>>I've tried
>> iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
>>and I didn't work

>
>
> Of course not. The masqueraded interface has to be the PPP interface,
> which is here renamed from ppp0 to dsl0 (obfuscation introduced by your
> distribution (or perhaps kppp?) :P).
>
>
>>Any help getting b2 to connect the net through b1?

>
>
> Since there it appears there is only one host behind the ADSL connection
> host the easiest thing to do would be to set the MTU of the Ethernet
> interface on b2 to 1454. Otherwise see section TCPMSS in man iptables.
>


Hey Cliff,

seems like you're certifying your signature...

Eric
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      08-01-2005, 09:42 PM
Eric Teuber <(E-Mail Removed)> wrote:

> Hey Cliff,


> seems like you're certifying your signature...


Backup that statement with facts that show I was wrong in anything
I posted.

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/


 
Reply With Quote
 
Eric Teuber
Guest
Posts: n/a

 
      08-01-2005, 11:09 PM
Clifford Kite wrote:
> Eric Teuber <(E-Mail Removed)> wrote:
>
>
>>Hey Cliff,

>
>
>>seems like you're certifying your signature...

>
>
> Backup that statement with facts that show I was wrong in anything
> I posted.
>


Probably not wrong, but unsophisticated...

< Is that a question? If so then yes, it's wrong, although you may get
> away with it since you intend to use masquerading. Why not use one
> of the private IP address ranges?


.... and that seems to be smartassing.

Eric
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      08-02-2005, 03:11 AM
Eric Teuber <(E-Mail Removed)> wrote:
> Clifford Kite wrote:
>> Backup that statement with facts that show I was wrong in anything
>> I posted.


> Probably not wrong, but unsophisticated...
>
> < Is that a question? If so then yes, it's wrong, although you may get
>> away with it since you intend to use masquerading. Why not use one
>> of the private IP address ranges?


> ... and that seems to be smartassing.


It was an honest attempt to quantify a sentence that seemed like a
question but had no question mark (or any other ending symbol), no
more. I don't know what you mean by "unsophisticated," but I can
think of no reason to equate the word with "smartassing."

If you can't point to anything you believe is wrong in my reply to
the OP then this discussion is finished. If you can, and are able
to substantiate it, then I'm always ready to admit to a mistake and
set the record straight.

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
/* In my book, the first poster to resort to personal abuse in a Usenet
debate loses by default. - Rod Smith */

 
Reply With Quote
 
G_r_a_n_t_@dodo.com.au
Guest
Posts: n/a

 
      08-02-2005, 04:31 AM
On Mon, 1 Aug 2005 22:11:14 -0500, Clifford Kite <(E-Mail Removed)> wrote:
>
> If you can't point to anything you believe is wrong in my reply to
> the OP then this discussion is finished. If you can, and are able
> to substantiate it, then I'm always ready to admit to a mistake and
> set the record straight.

Chill out, nobody cares... >)$

Grant.
--
Whom computers would destroy, they must first drive mad.
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      08-02-2005, 01:49 PM
G_r_a_n_t_@dodo.com.au wrote:
> On Mon, 1 Aug 2005 22:11:14 -0500, Clifford Kite
> <(E-Mail Removed)> wrote:
>>
>> If you can't point to anything you believe is wrong in my reply to
>> the OP then this discussion is finished. If you can, and are able
>> to substantiate it, then I'm always ready to admit to a mistake and
>> set the record straight.

> Chill out, nobody cares... >)$


--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sharing adsl taquitto Broadband 4 09-09-2004 04:16 PM
sharing adsl taquitto Broadband 2 09-08-2004 09:01 PM
ADSL Sharing ?? j & c Home Networking 3 05-18-2004 04:59 AM
sharing adsl dilbert Windows Networking 0 05-02-2004 10:55 AM
Using (sharing) ADSL connection between MAC and PC Nick Home Networking 1 11-04-2003 10:52 AM



1 2 3 4 5 6 7 8 9 10 11