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.
I have a FC3 box (without X), which have two adapters (eth0 and eth1).
I like use my linux box like router/gateway to internet for my second box with windows 2000.
Linux FC3 (eth0, eth1)------ISP--->
|
|----windows 2000
My linux box work fine. Problem is what I can't access to web pages, email, msn, etc. on internet from my windovs 2000 computer. But ICQ can connect to inetrnet from my windows box.
I have a lot serach on google and different forums, but can't solve my problem. I have also try quicktables script and it also no get me connect to internet from my windows box.
I have use this simple script which run by rc.local
#Now defining the standard policy
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
#Defining the real stuff !
# Allow access to the firewall from the localnet
iptables -A INPUT -s $localnet -d $privateaddr -j ACCEPT
iptables -A INPUT -s $localnet -d $publicaddr -j ACCEPT
# Allow access from ourself to us !
iptables -A INPUT -i lo -j ACCEPT
# Allow the firewall box to access the internet
iptables -A INPUT -s $any -d $publicaddr -m state --state ESTABLISHED,RELATED -j ACCEPT
# Should we masquerade the localnet to internet ?
iptables -t nat -A POSTROUTING -s $localnet -d $any -j MASQUERADE
-------------------------------------
and here is my etc/sysconfig/iptables :
---------------------------------------
# Firewall configuration written by redhat-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
--------------------------------------
Here is my stuff for Masquerading. For me eth0 connects to the WAN and eth1 to another box.
eth0 is a ethernet card with the address of 192.168.1.96 The default gateway for this box is 192.168.1.254 (the modems address)eth1 on this box is 192.168.0.1
crossover cable between the two;
Box two is set up with the ipaddress of 192.168.0.2 and its default gateway is 192.168.0.1 (Box one's eth1)
# iptables -F; iptables -t nat -F; iptables -t mangle -F
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# iptables -A INPUT -m state --state NEW -i ! eth0 -j ACCEPT
# iptables -A INPUT -p icmp -j ACCEPT
# iptables -P INPUT DROP
Last edited by comprookie2000; 06-24-2005 at 04:58 PM.
Hi,
I have solve my problem.
It was my mistake, in my windows box I put DND server 192.168.0.1 , but correct I must put DNS's of my ISP
Thanks DaneM for your how to.
Thanks!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.