HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Webserver under a firewall
Operating System - Linux
1826499
Members
1599
Online
109692
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 01:36 AM
06-17-2003 01:36 AM
Re: Webserver under a firewall
Thank you so much ... this document will refrain me from asking unnecessary questions. Thanks guys ... Im still stuck with my testing phase will let you know how it goes ... Currently studying how Steven's iptable works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 02:03 AM
06-17-2003 02:03 AM
Re: Webserver under a firewall
Further to Claudio's tips, and to make short answers to you last questions :
When you boot, a directory called /etc/rc.d/ has subdirectories called rc1.d rc2.d and so on. Inside, there is a list of programs that has to be launched at this stage. There is a copy of each in init.d directory.
What chkconfig does it that it adds to the relevant directory services to launch on startup.
You can add it by yourself in those directories (ading in rcx.d a number looking like S for start plus 'last S+1' you see there).
You can also start or launch a service by typing 'service lokkit start (or stop, or restart to stop and restart)' directly, replacing lokkit by the service name you wish. Beware that it'll launch it now, but it won't be turned on at boot time, it's just launched now...
When you have 2 firewalls running, like you have, it's interesting !
Look into your rc3.d or rc5.d (depending on if you boot on graphical or shell startup), and look at the numbers closed to the program names : they are the order in which things must be launched or stopped (killed, K) ! The highest number will be the right one, desactivating Ip tables policies set up by the other. They actually shouldn't conflict as they do not manage same things (as you know from Bastille install), even if it's off no use to have them both. One good idea would be to desactivate firewalling in Batsille, and let it to lokkit...
Iptables -F flushes all the rules, bringing you back to the default policy which should be, if Bastille installed 'drop all' ! So no net anymore... It should be fixed on restarting services or machine.
Redhat also has good tips on all these things, see :
many things on security (maybe too much) :
http://www.europe.redhat.com/documentation/rhl8.0/rhl-sg-en-8.0/
Iptables :
http://www.europe.redhat.com/documentation/rhl8.0/rhl-rg-en-8.0/ch-iptables.php3
see also
http://www.iptables.org/documentation/index.html
the direct Iptables, with many things on routing, NAT and filtering.
But do not hesitate to ask here too : it's often shorter to ask than to read pages and pages. Read to learn, ask to fix !
:]] We love points and are always ready to help...
J
When you boot, a directory called /etc/rc.d/ has subdirectories called rc1.d rc2.d and so on. Inside, there is a list of programs that has to be launched at this stage. There is a copy of each in init.d directory.
What chkconfig does it that it adds to the relevant directory services to launch on startup.
You can add it by yourself in those directories (ading in rcx.d a number looking like S for start plus 'last S+1' you see there).
You can also start or launch a service by typing 'service lokkit start (or stop, or restart to stop and restart)' directly, replacing lokkit by the service name you wish. Beware that it'll launch it now, but it won't be turned on at boot time, it's just launched now...
When you have 2 firewalls running, like you have, it's interesting !
Look into your rc3.d or rc5.d (depending on if you boot on graphical or shell startup), and look at the numbers closed to the program names : they are the order in which things must be launched or stopped (killed, K) ! The highest number will be the right one, desactivating Ip tables policies set up by the other. They actually shouldn't conflict as they do not manage same things (as you know from Bastille install), even if it's off no use to have them both. One good idea would be to desactivate firewalling in Batsille, and let it to lokkit...
Iptables -F flushes all the rules, bringing you back to the default policy which should be, if Bastille installed 'drop all' ! So no net anymore... It should be fixed on restarting services or machine.
Redhat also has good tips on all these things, see :
many things on security (maybe too much) :
http://www.europe.redhat.com/documentation/rhl8.0/rhl-sg-en-8.0/
Iptables :
http://www.europe.redhat.com/documentation/rhl8.0/rhl-rg-en-8.0/ch-iptables.php3
see also
http://www.iptables.org/documentation/index.html
the direct Iptables, with many things on routing, NAT and filtering.
But do not hesitate to ask here too : it's often shorter to ask than to read pages and pages. Read to learn, ask to fix !
:]] We love points and are always ready to help...
J
You can lean only on what resists you...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2003 09:39 AM
06-17-2003 09:39 AM
Re: Webserver under a firewall
1) Backup the iptables file.
Hare are my proposed changes.
They are preceeded by # comments telling you what to do. Don't include them in the file.
# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
# firewall; such entries will *not* be listed here.
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
# You may need to change the numbers in the brackets.
:PREROUTING ACCEPT [0:0]
:RH-Lokkit-0-50-INPUT - [0:0]
:OUTPUT ACCEPT [0:0]
# make the IP addresses below valid The first one is the firewall, second ip starting with 10 is the # iis web server
-A PREROUTING -p tcp -d 15.15.15.15 -dport 80 -j DNAT --to-destination 10.0.0.25
-A INPUT -j RH-Lokkit-0-50-INPUT
-A FORWARD -j RH-Lokkit-0-50-INPUT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 80 -j ACCEPT --syn
-A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
-A RH-Lokkit-0-50-INPUT -i eth1 -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 0:1023 -j REJECT --syn
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 2049 -j REJECT --syn
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 0:1023 -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 2049 -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 6000:6009 -j REJECT --syn
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 7100 -j REJECT --syn
COMMIT
# Generated by webmin
*mangle
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed
# Generated by webmin
*nat
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed
service iptables restart.
Sorry for the delay. This took thought, had to wait for my lunch break. Plus I'm short on sleep.
SEP
Hare are my proposed changes.
They are preceeded by # comments telling you what to do. Don't include them in the file.
# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
# firewall; such entries will *not* be listed here.
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
# You may need to change the numbers in the brackets.
:PREROUTING ACCEPT [0:0]
:RH-Lokkit-0-50-INPUT - [0:0]
:OUTPUT ACCEPT [0:0]
# make the IP addresses below valid The first one is the firewall, second ip starting with 10 is the # iis web server
-A PREROUTING -p tcp -d 15.15.15.15 -dport 80 -j DNAT --to-destination 10.0.0.25
-A INPUT -j RH-Lokkit-0-50-INPUT
-A FORWARD -j RH-Lokkit-0-50-INPUT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 80 -j ACCEPT --syn
-A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
-A RH-Lokkit-0-50-INPUT -i eth1 -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 0:1023 -j REJECT --syn
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 2049 -j REJECT --syn
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 0:1023 -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 2049 -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 6000:6009 -j REJECT --syn
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 7100 -j REJECT --syn
COMMIT
# Generated by webmin
*mangle
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed
# Generated by webmin
*nat
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed
service iptables restart.
Sorry for the delay. This took thought, had to wait for my lunch break. Plus I'm short on sleep.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP