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.
Can someone check my iptables file. My fedora box is connected to broadband. Two more PCs are connected to Linux forming a small network. I can use internet from Linux but cannot use from other two windows PC. I guess something wrong with my iptables. If I use iptables -F, I can use internet from every PC. Below is my iptables file.
Thanks,
Iqbal
# Generated by iptables-save v1.2.8 on Fri Jul 9 18:08:07 2004
*nat
:PREROUTING ACCEPT [54:4675]
:POSTROUTING ACCEPT [1:241]
:OUTPUT ACCEPT [1:241]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Fri Jul 9 18:08:07 2004
# Generated by iptables-save v1.2.8 on Fri Jul 9 18:08:07 2004
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [57:4346]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A FORWARD -s 192.168.0.0/255.255.255.0 -j ACCEPT
-A FORWARD -d 192.168.0.0/255.255.255.0 -j ACCEPT
-A FORWARD -s ! 192.168.0.0/255.255.255.0 -j DROP
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -i eth0 -j ACCEPT
#-A RH-Firewall-1-INPUT -p icmp -m icmp -j ACCEPT
#-A RH-Firewall-1-INPUT -p icmp -m icmp anywhere -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Fri Jul 9 18:08:07 2004
What's the set-up, is the linux-box equipped with two
NIC's, what is the broadband modem attached to,
how do the other machines talk to the modem?
Did you set-up a route on the Linux-box?
Thing is, if the linux-box is set-up as the router,
and you flush all rules the other shouldn't be able
to connect to the net either (unless you had more
than one non-private address [which you don't
appear to have]).
Thanks for the response. Linux box has two nics, eth0, eth1. Broadband modem is attached to eth0. The setup is like
linux eth1 - 192.168.0.1
WS1 - 192.168.0.2
WS2 - 192.168.0.4
Internet sharing works fine when iptables are flushed.
I am not sure if I have set-up the linux box as router. (not sure how). I can remember that forwarding=yes (or 1) is set in one file (can't remember).
Hope this will give you some clue.
u can add the followings into script if some services works on your gateway linux.
iptables -A INPUT -s 127.0.0.1 -j ACCPET
iptables -A INPUT -d 127.0.0.1 -j ACCPET
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.