Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi
i am new in Linux, i used winnt4.0 to share internet in my local network, now i want to use Linux as a local server instead of winnt to connect to the internet and share it to the other computer in my local network. so i would like to know with programms should i use witch files should be configured in order to connect to the internet with Linux and share it.
i have a modem connected to a router that is connected to the computer using ethernet card and another ethernet card for the local network eth1. i have a permanant connection with a fix ip. i configured the 2 cards but i still can't connect to the internet
so please help me
thank you
Am I right in thinking that your setup is like this?
Code:
Internet --> Router --> Linux Box --< Rest of network
If so, then you will want your Linux box configured so that eth0 is on one ip group and eth1 is on another, you would then set your Windows boxes to connect via (proxy?) your Linux box's eth1 ip address. Lots of people will suggest that you use dhcp for the internal, local network (of with your Linux box's eth1 will be a part of), but I maintain that if you're on a very small network (< 10 machines), it is just a easy to maintain if you give each one a seperate IP address.
sorry but u seem that u misundertood me , I couldn't connect to internet now , the eth1 have as ip 193.92.100.66 & is connected to the router which have an ip 193.92.100.65 ( i think that is the gateway ) & the nameserver of my isp ( i put them as the forwards in named.conf ) but the answer by ping to any host like www.google.fr is always "network unrecheable " & in the status bar of mozilla is first resolving hostname & now sending request but process isn't answering
thanks
Is it just name resolution that doesn't work? Can you ping an IP address for example (www.google.fr - 216.239.37.101) . If you cant then you need to see at what point you are getting stuck at. The way I do this is do a ping to each point out of your network until you find the address that is not responding, then investigate from there. At least then you will have narrowed down your problem to one spot.
i can ping in my local network but when i try to ping outside (internet) i have a message that said "destination host unreachable"
so i am asking if something to be done to connect to the internet . i configured the 2 ethernet cards one for the local network and the other to connect to the internet .
as i said above i used this configuration modem -> router (193.96.X.X) ->(193.96.X.X+1) linux (redhat8) 192.168.0.3
Have you put a route in place from one network card to the other on the Linux box? I am not sure exactly on the syntax (I am still new to Linux as well) but do a man route it it will show you some examples.
Do you have a FW (iptables?) running on the Linux box? Maybe this is blocking your access out. Maybe turn it off temporarily to verify a connection?
If you either telnet or console into your router can you verify that you can ping the internet from there. If you cant then the Linux box may not be your problem.
Distribution: Whatever I feel like at the time I install.
Posts: 284
Rep:
OK the way I see it is that you have everything setup except for the linux box. You need to be using either ipchains or iptables. I personally like iptables better and it is what replaced ipchains.
You should create a file that you execute on startup that will autostart these functions.
You also need to enable IP Forwarding by this line:
echo 1 > /proc/sys/net/ipv4/ip_forward
You also need these lines to forward traffic between NICs:
iptables -t nat -I POSTROUTING -p all -d 0/0 -s 0/0 -j SNAT --to-source xxx.xxx.xxx.xxx (ext IP address)
if you e-mail my i will send you a copy of my script (too big for here)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.