Help!

2 NIC problem - Please Help

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions RSS
Next:  Work-needing packages report for Mar 6, 2009  
Author Message
sudeep333
External


Since: Mar 06, 2009
Posts: 1



PostPosted: Fri Mar 06, 2009 12:02 am    Post subject: 2 NIC problem - Please Help
Archived from groups: linux>redhat (more info?)

Hello to all the masters,

I am using RHEL 5 and facing problem related to 2 NICs.

NIC1 is connected to the internet and used to provide the internet
access to all my internal LAN systems which are connected to my second
NIC2 via a hub.

NIC1 is on DHCP and i am providing static IP address on NIC2 -
192.168.0.1

My LAN systems are pinging to my server but not able to provide
internet access to my LAN. My LAN systems are on windows XP

Please tell me what should i do.


NIC1 Configuration
DHCP


NIC2 Configuration
IP: 192.168.0.1
Mask: 255.255.255.0
gateway:

i have edited the /etc/sysctl.conf ipv4_forwarding to 1 but still the
issue is there.

Please tell me that is there anything related to iptables or any
simple solution is there.

My need is just to provide the internet access to my LAN systems via
my server.

Thanx in anticipation
Back to top
Jan Gerrit Kootstra
External


Since: Apr 08, 2004
Posts: 295



PostPosted: Fri Mar 06, 2009 7:10 pm    Post subject: Re: 2 NIC problem - Please Help [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

sudeep333 schreef:
> Hello to all the masters,
>
> I am using RHEL 5 and facing problem related to 2 NICs.
>
> NIC1 is connected to the internet and used to provide the internet
> access to all my internal LAN systems which are connected to my second
> NIC2 via a hub.
>
> NIC1 is on DHCP and i am providing static IP address on NIC2 -
> 192.168.0.1
>
> My LAN systems are pinging to my server but not able to provide
> internet access to my LAN. My LAN systems are on windows XP
>
> Please tell me what should i do.
>
>
> NIC1 Configuration
> DHCP
>
>
> NIC2 Configuration
> IP: 192.168.0.1
> Mask: 255.255.255.0
> gateway:
>
> i have edited the /etc/sysctl.conf ipv4_forwarding to 1 but still the
> issue is there.
>
> Please tell me that is there anything related to iptables or any
> simple solution is there.
>
> My need is just to provide the internet access to my LAN systems via
> my server.
>
> Thanx in anticipation

Sudeep,


It has to do with Iptables.

Just look for Linux firewall howto on Google and you find some good
examples.


Kind regards,


Jan Gerrit Kootstra
Back to top
H.Janssen
External


Since: Mar 08, 2009
Posts: 1



PostPosted: Sun Mar 08, 2009 3:10 am    Post subject: Re: 2 NIC problem - Please Help [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Dear sudeep333,

sudeep333 wrote:

> Hello to all the masters,
>
> I am using RHEL 5 and facing problem related to 2 NICs.
>
> NIC1 is connected to the internet and used to provide the internet
> access to all my internal LAN systems which are connected to my second
> NIC2 via a hub.
>
> NIC1 is on DHCP and i am providing static IP address on NIC2 -
> 192.168.0.1
>
> My LAN systems are pinging to my server but not able to provide
> internet access to my LAN. My LAN systems are on windows XP
>
> Please tell me what should i do.
>
>
> NIC1 Configuration
> DHCP
>
>
> NIC2 Configuration
> IP: 192.168.0.1
> Mask: 255.255.255.0
> gateway:
>
> i have edited the /etc/sysctl.conf ipv4_forwarding to 1 but still the
> issue is there.
>
> Please tell me that is there anything related to iptables or any
> simple solution is there.
>
> My need is just to provide the internet access to my LAN systems via
> my server.
>
> Thanx in anticipation


Yes, this is partly OK. Your system is able to do routing, and if you define
the server as default gateway on the XP boxes, packets will probably go out
to the internet, and never come back, because your 192.168.0 subnet is,
completely correct, a private subnet, and cannot be routed back

Just one iptables line will do the job:

/sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j
MASQUERADE

and all traffic from your clients will go out as originating from the
server.

The XP clients should have the server as default gateway and the same DNS
settings as your server in /etc/resolv.conf.
You could consider to use "dnsmasq" as DHCP and DNS server to set
all parameters in the clients automatically.

Good luck!

H.Janssen
Alkmaar
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum