LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-27-2005, 02:54 PM   #1
fdawy
LQ Newbie
 
Registered: Mar 2005
Posts: 17

Rep: Reputation: 0
the Internet connection sharing problem the set


the Internet connection sharing problem the set


"""" Let's get started then:

Edit /etc/sysconfig/network-scripts/ifcfg-eth0 - This is the main config file for the first (internet facing) interface.
It should read : (you can leave out anything on a line after #)

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes
MII_NOT_SUPPORTED=yes

Edit /etc/sysconfig/network-scripts/ifcfg-eth1 - This is the main config file for the second (LAN facing) interface.
It should read :

DEVICE=eth1
BOOTPROTO=static
IPADDR=192.168.3.1
NETMASK=255.255.255.0
NETWORK=192.168.3.0
BROADCAST=192.168.3.255
ONBOOT=yes
MII_NOT_SUPPORTED=yes
/etc/resolv.conf should contain the nameserver address(es) - put the address of your ISPs nameserver right at the top. eg:

nameserver 195.20.224.165You can have multiple nameserver xxx.xxx.xxx.xxx lines - the resolver will try them all in turn if one fails

The default gateway and your hostname go in /etc/sysconfig/network:

HOSTNAME=localhost
NETWORKING=yes
GATEWAY=192.168.1.1


We then need to set up packet forwarding:
Put the following command at the beginning of /etc/sysctl.conf

net.ipv4.ip_forward=1

Then 'turn off' the redirection to squid:
Install iptables - type "urpmi iptables" as root, or use the package manager in the start menu or mcc

Add the following code to the bottom of /etc/rc.d/rc.local.

iptables -t nat -D PREROUTING -i eth0 -j loc_dnatThis will delete a rule from your firewall - later, when you understand more, you can change shorewall and remove this line, but for now we'll keep it simple.


Reboot."""""""""


why problem
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up Internet Connection Sharing on fedora core 1? milkrock Linux - Networking 7 01-29-2006 04:52 AM
How do i install a network card/drivers or set up internet connection sharing? Daz155HGT Linux - Newbie 1 04-20-2004 05:22 PM
Internet Connection Sharing Problem sayua Linux - Networking 2 03-23-2004 10:10 PM
internet connection sharing problem zammer Linux - Networking 2 09-04-2003 04:03 AM
Problem with Internet Connection Sharing will824 Linux - Networking 0 06-21-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration