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.
Does anyone know why after ive run my firewall script that I can no longer access anything through my external interface (eth0) on that machine... Everything else works fine. Connection sharing works fine, im able to connect the internet on my other machines that use it as a gateway...
Heres my script.
#!/bin/bash
#
IFACE_EXT="eth0"
IFACE_INT="eth1"
# Clear any previous iptables rules
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
echo "All Tables and Rules Cleared..."
# Default policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
echo "Default Chain Policies Set..."
Based on the above script how would I open port 80 or other services on the router its self... Id like to be able to see my pages being served up using apache, but it seems I'm missing something and I cant view anything when trying to browse. The server is up... ssh seems to work... I tried using the same syntax used to open ssh but only on port 80 but still not working... any ideas.... also is there anything I could add to my script to help harden it... right now its pretty basic... id like to block all that bad stuff out there... any help as always is greatly appreciated..
So you've got this:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
but still can't see anything through the router ? I would guess it's some setting in the router that you've got to change. Remember that dropping all other connections should always be the last thing you do.
Ya im still figuring all this iptables stuff out... so its a trial by error type thing for me... I have a suspission that its to do with apache... I just found out even though installed with apt-get its proccess not running when checked with ps -A. So ive downloaded the source and im compiling apache myself, well see if this works now...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.