![]() |
|
OpenBSD Security Functionally paranoid! |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
I know this that is probably the most basic question but my syntax just does work as I expected. First here is the syntax and then I will try to explain the result I want:
Code:
MGMT = "em2" OPS = "em0" ### OPS Network 10.11.0.0/16 DMZ = "em1" ### DMZ Network 10.12.0.0/16 OPSUBNET = "10.11.0/16" IT = "10.10.10.100" ext_if = "em0" icmp_types = "{ echoreq, unreach }" mgmt_ports = "{ ssh, telnet }" # Policies set block-policy drop set loginterface $ext_if set skip on lo # Tables table <bruteforce> persist block in quick from <bruteforce> # default block block return log pass log from $OPS pass log proto tcp to self port ssh pass in on $OPS inet proto tcp from $OPSUBNET to $OPS port $mgmt_ports pass out on $OPS inet proto tcp to MGMT port $mgmt_ports pass in on $MGMT inet proto tcp from $OPS to $MGMT port $mgmt_ports pass out on $MGMT inet proto tcp to $IT port $mgmt_ports pass log inet proto icmp all icmp-type $icmp_types keep state 10.11.0.10 ---------> SSH 10.11.0.11 via ($OPS em0) --------->10.10.10.1($MGMT em2)---------> $IT (10.10.10.100 Client) 10.10.10.100 ------> SSH via 10.10.10.1 ($MGMT em2)---------> ($DMZ em1)---------> Client Machine (10.12.0.10) So I want to be able to ping from 10.11.0.10 and traceroute to 10.10.10.100, also to do the same in reverse order I would like to be able to ssh into Client 10.10.10.100 from client 10.11.0.10 I would like to be able to ssh into Client 10.12.0.10 from client 10.10.10.100 and also ping it. I just cant seem to figure out where I have gone wrong or what static routes I would need. Please help? I would be eternally grateful |
|
|||
![]()
OPSNETWORK ———————|. |—————— DMZNETWORK
10.11/16 | | 10.12./16 em0 em2 | | BSDROUTER | em1 | | MGMGTNETWORK 10.10/16 SSH FROM OPSNETWORK TO MGMTNETWORK SSH FROM MGMTNETWORK TO DMZNETWORK HTTPS ONLY FROM DMZNETWORK TO MGMTNETWORK PING FROM OPSNETWORK TO IP ON em0 PING FROM MGMTNETWORK TO ANY ON DMZ AND OPSNETWORK I hope this clarifies it? |
|
|||
![]()
Here is an image of the network as attachment
|
|
||||
![]()
Here is a ruleset based on your graphic. Note that there is no "Internet" connection defined, nor is there any domain traffic permitted. What ICMP traffic is permitted is ping, only, and limited as you directed.
Code:
ops = "10.11/16" dmz = "10.12/16" mgt = "10.10/16" # default block block return log # ssh: # from ops to mgt # from mgt to dmz pass log proto tcp from $ops to $mgt port ssh pass log proto tcp from $mgt to $dmz port ssh # https: # from dmz to mgt pass log proto tcp from $dmz to $mgt port https # ping: # from ops to the address(es) defined for em0 # from mgt to dmz and ops pass log proto icmp from $ops to em0 icmp-type echoreq pass log proto icmp from $mgt to { $dmz $ops } icmp-type echoreq |
|
|||
![]()
Unfortunately it worked perfectly í ½í¸‰í ½í¸‰í ½í¸‰ thank you so much
|
|
|||
![]() Quote:
Code:
pass log proto tcp from $ops to $mgt port ssh pass log proto tcp from $mgt to $dmz port ssh |
|
|||
![]() Quote:
So the rules above are defined in one bsdrouter. There is another bsdrouter doing something similar. The $dmz_ops is the egress on the other router. I hope that makes sense? Last edited by calanon; 4th November 2019 at 01:19 PM. |
|
||||
![]()
Not as written.
You have confused me, because you are reporting a problem that is out-of-scope for the problem set you defined for this thread. I also don't know if this new complaint is related to your ssh "block" problem you also reported here today, or if that problem is related to the scope previously defined in this thread. I can only work with what YOU choose to provide. My crystal ball is broken. |
|
|||
![]() Quote:
I have attached an image that I hope makes sense. |
|
||||
![]()
I have had the opportunity to review the new graphic.
As I perceive it, your new subnet "$dmz_ops" has introduced a routing problem, because the subnet address (192.168.15/24) is not within the larger $dmz subnetwork (10.12/16). I believe there may be three ways to manage this new subnet. In recommended order:
|
|
||||
![]()
I had some time this evening to replicate the environment. Two routers, 4 subnets, and terminal workstations/servers on all 4 networks. I used your addressing schema, and did not test https or NAT. Pings and ssh sessions were the extent of my tests.
I was able to establish ssh sessions from the $mgt network to the new $dmz_ops network via adding the following lines to the pf.conf I posted earlier in this thread, using it in Router 1. Code:
. . dmz_ops = "192.168.15/24" . . pass log proto tcp from $mgt to $dmz_ops port ssh . . Router 1 requires a static route(8) for the $dmz_ops subnet. As an example, the hostname.if(5) file on Router 1 that defined the $dmz subnet contains: Code:
10.12.0.1/16 !route add 192.168.15.0/24 10.12.0.2 |
|
|||
![]()
Thank you for your time. This seems to work as intended. Just need to get the NAT working now
|
|
||||
![]()
If the $dmz_ops subnet is used without NAT:
Add that decision and provisioning again for every device you might add to the $dmz_ops subnet. --- If you're interested in alternative topologies, a tiered-DMZ solution often looks something like this: {Internet} - [FW1] - DMZ - [FW2] - {Local intranet} FW1 blocks external inbound traffic from reaching FW2. FW2 only permits select, expected traffic from DMZ servers into specific local systems, such as permitting only SQL queries from a specific DMZ application server to reach its back-end database server. The local intranet is often further subdivided into subnets-by-service, such as database servers, internal-facing servers, workstations and VOIP, and backup. Each can have a similar tiered DMZ in place. |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Security Oracle accidentally release MySQL DoS proof of concept | J65nko | News | 0 | 17th April 2012 06:00 AM |
Upgrade to v8 lost some Hardware | bforest | FreeBSD General | 3 | 7th May 2010 05:54 PM |
hal and lost interupt | shep | NetBSD General | 1 | 23rd October 2009 07:12 AM |
vr0: rx packet lost | tutosun | FreeBSD General | 4 | 13th September 2008 10:13 AM |
Lost posts | graudeejs | Feedback and Suggestions | 5 | 3rd August 2008 02:59 PM |