I also found that Apache didn’t care what the Host header was when using HTTP/1.1, just so long as something was there: However I did find that I could ignore the Host header if I specified HTTP/1.0: I could not get it to work with an absoluteURI, even using the example in the RFC. Recipients of an HTTP/1.0 request that lacks a Host header field MAY attempt to use heuristics (e.g., examination of the URI path for something unique to a particular host) in order to determine what exact resource is being requested. If the host as determined by rule 1 or 2 is not a valid host on the server, the response MUST be a 400 (Bad Request) error message. If the Request-URI is not an absoluteURI, and the request includes a Host header field, the host is determined by the Host header field value.ģ. Any Host header field value in the request MUST be ignored.Ģ. If Request-URI is an absoluteURI, the host is part of the Request-URI. I looked up the HTTP specification, and as described in section 5.2 of the RFC:ġ. I swear I’ve done this before without a Host header though. I eliminated the User-Agent the Accept headers and it still worked, so the missing Host header was the cause of my problems. I put the same headers (with a modified User-Agent) into my printf statement: I decided to take a look at what curl was sending, since that was working:
![nc netcat nc netcat](https://www.poftut.com/wp-content/uploads/2017/02/img_58b284b4562f3-768x587.png)
Which also returned a HTTP/1.1 400 Bad Request error. Which returned a HTTP/1.1 400 Bad Request error. On a server running Apache 2.4.6, first I tried: curl is an excellent tool for ad hoc HTTP requests. Host: echo "hello" | nc 192.168.1.I must have had some reason for wanting to do this, although I can’t think of why right now. The below should work to get a broadcast forwarded to another network via netcat:
![nc netcat nc netcat](https://i.stack.imgur.com/hvLVS.png)
The -u is not needed as it is telling netcat to listen on a unix domain socket, google IPC :) (this is the biggest reason that your scenario is not working.) l 0.0.0.0 12101, tells netcat to listen on port 12101 on all interfaces that are up and with an IP address assigned.
![nc netcat nc netcat](https://i.stack.imgur.com/n3btY.jpg)
For Cisco IOS you would type in, under the interface, "ip directed-broadcast".Ģ55.255.255.255 is a limited broadcast and is not going to get pass your routers regardless, it is solely intended for the layer 2 link that it resides. you would need to reference its documentation. Configuring your device to forward directed broadcast. Then the firewall, assuming it had a route to 192.168.1.0/24 and that it is set up to forward directed broadcast, would forward that broadcast out to the destination or next hop. For example for the subnet 192.168.1.0/24 the directed broadcast would be 192.168.1.255, the last IP in the subnet.
![nc netcat nc netcat](https://miloserdov.org/wp-content/uploads/2019/05/dns-ncat-1100x600.png)
If you wanted that to happen then you would need to send a directed broadcast. If that is the case and this firewall is also acting also as a router (or if the packet has to go through a router) then it is going to process that packet but it will not forward it out its other interfaces. Sorry, if I am assuming wrong but you mentioned that you have your firewalls set up correctly so I am guessing that the host and client are not on the same subnet?