[CentOS] Network configuration question [solved]

Niki Kovacs contact at kikinovak.net
Mon Feb 18 07:22:27 UTC 2008


Robert a écrit :
> 
> 1. Leave your current working LAN untouched.
> 2. Physically connect your desktop PC and the older laptop with a 
> rollover cable.
> 3. Create a second network on your desktop PC using eth0. 192.168.2.1 
> would work fine.
> 4. Add the laptop to the new network, assigning it 192.168.2.2 (or 
> whatever)
>   At this point, you should be able to ping the desktop from the laptop 
> and vice versa.

<snip>

First of all, I want to thank everyone here for the contributions.

I spent the best part of yesterday evening and this morning 
experimenting, and here's a nice solution I found.

Desktop PC: as described above, e. g. leave the current working LAN 
untouched, then configure the Ethernet card for a 192.168.2.x subnet. 
Add the laptop to this new subnet, and connect it to the desktop PC with 
a crosslink cable.

Now, I took advantage of some nicely preconfigured iptables rules in the 
administration tools:

# system-config-securitylevel-tui

*** Firewall Configuration ***

Security Level (*) Enabled

 > Customize

Trusted Devices:    [*] eth0 [ ] wlan0

MASQUERADE Devices: [*] eth0 [ ] wlan0

***************************************

# service iptables restart

Result:

1) My 192.168.2.2 laptop can connect to the internet, using the desktop 
PC as gateway.

2) 192.168.2.2 can ping any 192.168.1.x machine transparently.

3) Reversely, any 192.168.1.x machine can ping the 192.168.2.2 laptop.

Conclusion: a huge step for me, a small step for humanity :oD

Cheers,

Niki



More information about the CentOS mailing list