Re: Possible case of ip forwarding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



First off, you mail reader is sending HTML character entitites instead
of characters. Is there some way you can turn that off? Or ask the
surfsite folks to fix it? Thanks

On Fri, Jul 13, 2007 at 04:08:28PM +0200, aravindan wrote:
> Hi ,
> I have migrated to linux from windows recently. The distro I am
> running is FC6 64 bit.
>
> I have a desktop running windows and a laptop running FC6.
> Can I have my desktop's internet traffic , go through my laptop
> ?
>
> Laptop is able to access internet without any issues. Please note
> that my laptop has only the single wireless NIC enabled(I dont want
> to enable my wired interface for this case) which it uses to go
> online.So no case of routing here.
>
> In other words , can my laptop , by being a standalone computer that
> it is , act as a default gateway for my desktop ?
> I changed my desktop's default default gateway to be my
> laptop's ip address.
>
> If I am confusing you guys , here's a small schematic
> illustration of my requirement :-
>
> Desktop ----------->>Laptop(ip=x.x.x.216) --> Internet
>  ip=x.x.x.78
> g/w=laptop ip
> Laptop's gateway is the default gateway of the network.
> My take here is that once the desktop's traffic is destined to
> the internet and hits the laptop's NIC , the laptop will drop it
> simply because it cannot reroute that packet on its own interface back
> to the gateway(192.168.128.254). If I am right about this statement ,
> then my question is , how can I tell my laptop to forward the
> connection or reroute it ?  Or is it possible at all ????
> Can I make use of ip forwarding here ?
>

You will need another NIC on the laptop, to access the internal
network. Since you have only the two machines, a crossover Ethernet
cable should do it, saving you the cost of a switch or hub.

You set up an internal network using an "experimental IP network",
e.g. 192.168.23.0/24. For only two computers, hard code everything on
the internal network. The internal network's gateway is the internal
interface for the gateway machine. E.g. on my network:

[root@dragon ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
0.0.0.0         192.168.1.12    0.0.0.0         UG    0      0        0 eth1

The third line specifies the gateway ("man route" for details).

You then set up the gateway machine to do the routing and
forwarding. I recommend firestarter ("yum install firestarter") for
the job, but there are other tools.

So you get, e.g.:

Desktop  <---------------->  Laptop  <-------------> ISP
192.168.23.23      192.168.1.1    10.0.0.45     10.0.0.1

You might read up on networking at, e.g., the Linux Documentation
Project (http://www.tldp.org/).

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB

Attachment: pgpeomgWEwHb9.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux