sta+ap Wifi mode and dnsmasq dns + dhcp setup

February 12, 2024, 19:12

___commander___

Hello, for a project, I wanted to be able to connect to a website hosted by my Pi 4, get a ip address via dnsmasq dhcp server and tunnel some domains (like server.lan to 127.0.0.1) while being connect to a host network to communicate to the world wide web. I have found guide for all of these separately, but those didn't work, even separately.

___commander___

Btw, I want the PI to host its own network so it could work standalone as connected devices would be in the same network with the server hosting the webpage.

oops.se

Please read https://discord.com/channels/818384379197784084/1189386838788542464 and add some substantial info!

___commander___

There is ni substantial info missing, i have a pi 4,and deacribed what i want, previous attempta failed so i want to "reatart" with some help, therefor there is no previous setup info missibg and as said whta i want to use (dnsmasq)

___commander___

Correct me if i am wrong*

oops.se

OS version, config files, output from ip -a and route -n that is substantial info.

___commander___

raspberry pi os lite lts, what configs?, my ip address 🤨?

oops.se

<:confusedblob:1053364681575776276>

___commander___

but sure:
server@RaspberryPI4bHotspot:~ $ ip -a
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
       ip [ -force ] -batch filename
where  OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp |
                   link | macsec | maddress | monitor | mptcp | mroute | mrule |
                   neighbor | neighbour | netconf | netns | nexthop | ntable |
                   ntbl | route | rule | sr | tap | tcpmetrics |
                   token | tunnel | tuntap | vrf | xfrm }
       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
                    -h[uman-readable] | -iec | -j[son] | -p[retty] |
                    -f[amily] { inet | inet6 | mpls | bridge | link } |
                    -4 | -6 | -M | -B | -0 |
                    -l[oops] { maximum-addr-flush-attempts } | -br[ief] |
                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |
                    -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] |
                    -c[olor]}
server@RaspberryPI4bHotspot:~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.178.1   0.0.0.0         UG    3003   0        0 wlan0
192.168.178.0   0.0.0.0         255.255.255.0   U     3003   0        0 wlan0

___commander___

still, what configs do you mean?

___commander___

wdym?

soon06688

i have a simple problem on my post please help me

___commander___

no crossposting

___commander___

pls*