Hello, Is it possible to redirect http incoming request for an IP address to a domain name? For example, if someone entered "1.2.3.4" IP in his\her browser then it redirect to "example.net". Can Firewalld do these kind of tasks?
Thank you.
On Thu, Sep 24, 2020 at 05:35:29PM -0000, Jason Long wrote:
Hello, Is it possible to redirect http incoming request for an IP address to a domain name? For example, if someone entered "1.2.3.4" IP in his\her browser then it redirect to "example.net". Can Firewalld do these kind of tasks?
Maybe you're looking for "forward ports". That allows redirecting traffic to a different ip and port. But it works for _incoming_ and _forwarded_ traffic. It does _not_ work for traffic originating from the host running firewalld, i.e. output traffic.
Thank you. I want HTTP protocol. Could Firewalld support that protocol?
On Sat, Sep 26, 2020 at 05:38:53PM -0000, Jason Long wrote:
Thank you. I want HTTP protocol. Could Firewalld support that protocol?
Yes. It supports all protocols.
Either through services. e.g.
# firewall-cmd --add-service http
or by port numbers
# firewall-cmd --add-port 8080
No, HTTP protocol for redirect.
On Monday, September 28, 2020, 02:55:42 PM GMT+3:30, Eric Garver egarver@redhat.com wrote:
On Sat, Sep 26, 2020 at 05:38:53PM -0000, Jason Long wrote:
Thank you. I want HTTP protocol. Could Firewalld support that protocol?
Yes. It supports all protocols.
Either through services. e.g.
# firewall-cmd --add-service http
or by port numbers
# firewall-cmd --add-port 8080
Excuse me, I think my question was vague. When a user enter my web server IP address in his\her Browser like FireFox, Brave or... then Firewalld forward that IP to a domain like "https://example.net". Is it possible by Firewalld? I don't like to use Apache for it.
On Monday, September 28, 2020, 04:46:52 PM GMT+3:30, Eric Garver egarver@redhat.com wrote:
On Mon, Sep 28, 2020 at 01:05:39PM +0000, Jason Long wrote:
No, HTTP protocol for redirect.
Sure.
# firewall-cmd --forward-port port=80:proto=tcp:to-port=8080:to-addr=10.10.10.10
On Mon, Sep 28, 2020 at 01:49:06PM +0000, Jason Long wrote:
Excuse me, I think my question was vague. When a user enter my web server IP address in his\her Browser like FireFox, Brave or... then Firewalld forward that IP to a domain like "https://example.net". Is it possible by Firewalld? I don't like to use Apache for it.
Sounds like you're looking for HTTP redirect. No. firewalld can not do that. It only does port/IP level redirection.
Thus, Firewalld can't understand the request from Browsers?
On Monday, September 28, 2020, 06:03:55 PM GMT+3:30, Eric Garver egarver@redhat.com wrote:
On Mon, Sep 28, 2020 at 01:49:06PM +0000, Jason Long wrote:
Excuse me, I think my question was vague. When a user enter my web server IP address in his\her Browser like FireFox, Brave or... then Firewalld forward that IP to a domain like "https://example.net". Is it possible by Firewalld? I don't like to use Apache for it.
Sounds like you're looking for HTTP redirect. No. firewalld can not do that. It only does port/IP level redirection.
--On Monday, September 28, 2020 8:41 PM +0000 Jason Long hack3rcon@yahoo.com wrote:
Thus, Firewalld can't understand the request from Browsers?
I think you need to read up on how HTTP and TCP/IP work. It's far too big a subject to teach you that here.
I don't like to use Apache for it.
Apache does HTTP. If you don't like it, you'll need to choose another web server. But firewalld is NOT a web server. It doesn't work at that level. It's an IP firewall.
firewalld-users@lists.fedorahosted.org