Putting a public IP on my Debian squeeze server....firewall rules.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Oh ok, I see what you mean. You will have to turn on IP forwarding, and forward that range to port 443 of your server, then use what I posted on your server to allow access to port 443.
OK so after setting up IP forwarding I created three rules within the firewall.
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j DNAT --to 192.168.x.x:443
iptables -A INPUT -p tcp -m state --state NEW --dport 443 -i eth0 -j ACCEPT
I then added..
iptables -A PREROUTING -t nat -i eth0 -p tcp --source 67.218.x.x/24 --dport 443 -j DNAT --to 192.168.x.x:443
I have no fully tested these just yet but I am fairly confident they should work as described. Unless I missed something....which is quite possible :-)
The above lines were accept when I added the three rules...BUT this is what I get what I try iptables -L. Is this correct? Just dont look right to me....
procps is the package that has a bunch of small useful utilities that give information about processes using the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill.
I am not familiar with procps, but a quick look at the website indicates to me, it doesn't have anything to do with iptables.
Code:
/etc/init.d/iptables restart
will restart the firewall. but in doing so, will reload the default rules, contained (centos/rhel at least), in /etc/sysconfig/iptables
so once your rules are configured, and working, you would probably want to do something to the effect of:
to save the currently implemented rules. This will also make the rules persistent across reboots as they are loaded from that file via the init scipts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.