0

I have a wifi-access point at wlan0 ip 10.42.0.1 . At the same machine there is httpd runnig locally, and when i access it from local browser by 10.42.0.1 - i can see webpage perfectly fine. When i do on that machine nmap i can see port 80 is open.

But when i connect to that access point from another machine, even i can ping 10.42.0.1 fine - wget or browser gives me connction refused, as well as nmap shows no 80 open.

what i have done already:

  1. In httpd.conf i have added Listen 10.42.0.1:80
  2. I have added ip table rule iptables -I INPUT -p TCP --dport 80 -j ACCEPT
  3. I checked with tcpdump port 80 - and actually can see traffic comes in when i am trying to access web page.

What esle can i do to solve the problem?

UPD ip table input rule is there:

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   14  1524 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80
    0     0 LOG        tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80 LOG flags 0 level 4
    2    88 ACCEPT     tcp  --  wlan0  *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80 /* # Anaconda Repo # */
    0     0 ACCEPT     tcp  --  eth0   *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80 /* # Anaconda Repo # */
82027   81M LIBVIRT_INP  all  --  *      *       0.0.0.0/0            0.0.0.0/0
7
  • 1
    Do you have any other rules that could be rejecting the traffic before your accept rule? iptables -L -n -v Commented Dec 30, 2021 at 19:48
  • @PaulBurrows i have updated question with input rules that i got with this command Commented Dec 30, 2021 at 19:55
  • 1
    That is strange. I would try to turn off iptables completely and try it again. If it will work, you can be sure, the problems is with the firewall. Commented Dec 30, 2021 at 20:53
  • @JohnRonald doesn't help. May be the fact that i have access point on the same ip/interface matters? Somthing like the interface is used to share wifi and can't accept incoming connection Commented Dec 30, 2021 at 20:59
  • 1
    To avoid a lot of further questions, can you complete your question with the output of this? ip -br link; ip -br address; ip route and iptables-save -c which has a way better usable output than iptables -L . Also what is the IP address of the client trying and failing to reach the web server? Commented Dec 31, 2021 at 10:33

1 Answer 1

1

It was the firewalld service that was blocking ports.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.