- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- IPFilter on HP-UX
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО04-03-2023 01:33 PM - last edited on тАО04-05-2023 04:28 AM by support_s
тАО04-03-2023 01:33 PM - last edited on тАО04-05-2023 04:28 AM by support_s
IPFilter on HP-UX
Anyone using IPFilter?
I have a really easy filter requirement.
I have a list of ports that must be blocked except for a couple of server IP addresses.
The 130 page manual for IPFilter has lots of complex examples, but nne come close to what I need.
In words: Block all access to ports 34567-34599 but allow IPaddr 12.34.56.78 to get through.
- Tags:
- Operating System
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2023 11:44 PM
тАО04-04-2023 11:44 PM
Re: IPFilter on HP-UX
You might achieve your filtering requirement using IPFilter on HP-UX by following these steps:
Install IPFilter on your HP-UX system if it is not already installed.
Create a new configuration file for IPFilter, e.g. /etc/ipf.conf, and add the following rules to it:
# Block all traffic on ports 34567-34599
block in proto tcp from any to any port 34567-34599# Allow traffic from IP address 12.34.56.78 on any port
pass in proto tcp from 12.34.56.78 to any keep state- Load the new IPFilter rules by running the following command:
ipf -Fa -f /etc/ipf.conf
This will flush the existing rules and load the new rules from the ipf.conf file. - Verify that the IPFilter rules are in effect by checking the output of the following command:
ipfstat -io
You should see the two rules you added in the output.
With these rules, all incoming traffic to ports 34567-34599 will be blocked, except for traffic from IP address 12.34.56.78, which will be allowed on any port.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2023 10:46 AM
тАО04-06-2023 10:46 AM
Re: IPFilter on HP-UX
I didn't explain the requirement very well.
The source machine needs the filter.
So, on the source machine, I want specific ports to connect to specific IPs and refuse any other machines.
So for ports 34567 and 34577, don't allow any machine to connect except 12.34.56.78 and 23.45.67.89.
Thus a port scan aimed at the source machine will find those 2 ports always refusing connection.
But the two IP addresses can open the two ports on the source machine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2023 12:57 AM
тАО04-19-2023 12:57 AM
Re: IPFilter on HP-UX
Thank you for clarifying your requirement. Follow the above #1, #3, and #4th steps.
For Step #2, follow below:
Create a new configuration file for IPFilter, e.g. /etc/ipf.conf, and add the following rules to it:
# Block all incoming traffic by default
block in all
# Allow incoming traffic on port 34567 from IP addresses 12.34.56.78 and 23.45.67.89
pass in proto tcp from {12.34.56.78, 23.45.67.89} to any port 34567 keep state
# Allow incoming traffic on port 34577 from IP addresses 12.34.56.78 and 23.45.67.89
pass in proto tcp from {12.34.56.78, 23.45.67.89} to any port 34577 keep state
You should see the three rules you added in the output.
With these rules, all incoming traffic to your source machine will be blocked by default. However, traffic from IP addresses 12.34.56.78 and 23.45.67.89 will be allowed to connect to ports 34567 and 34577, while all other machines will be refused connection to these ports. This will effectively prevent port scanning on these two ports, and only the two specified IP addresses will be able to connect to them.
Hope this help! Let me know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2023 07:34 AM
тАО04-19-2023 07:34 AM
Re: IPFilter on HP-UX
Hello Vinky_99
1)block out quick on lan0 all head 150
pass out quick on lan0 from any to 12.34.56.78 port 34567 >< 34599 group 150
2)pass out on lan0 all head 150
pass out quick on lan0 from any to 12.34.56.78 port 34567 >< 34599 group 150
block out quick on lan0 from any to any port 34567 >< 34599 group 150
3)pass out on lan0 all head 150
pass out quick on lan0 from any to 12.34.56.78 port 34567 >< 34599 head 151 group 150
pass out quick on lan0 group 151
block out quick on lan0 from any to any port 34567 >< 34599 group 150
4)block out on lan0 all head 150
block out quick on lan0 from any to 12.34.56.78 port 34567 >< 34599 head 151 group 150
pass out quick on lan0 all group 151
block out quick on lan0 from any to any port 34567 >< 34599 group 150
block out on lan0 all head 150
5)block out quick on lan0 from any to any port 34567 >< 34599 head 151 group 150
pass out quick on lan0 from any to 12.34.56.78 group 151
You may try one of the above and see which one works for you .
I work for HPE/ I am an HPE Employee (HPE Community)
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
