create_ap and iptable rules

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
OlivierM

create_ap and iptable rules

Post by OlivierM »

Hello,

I have been testing create_ap recently, but I have noticed one disturbing thing ;
When starting a new AP with let's say: sudo create_ap wlan0 eth0 MyAP MyPassword, the rules set in iptables are completely modified without asking.
That comes from prerouting and all, but that leaves an open access to the machine for a short while.
How can I detect when the access point is created, and the microsecond afterward, restore the iptable rules ?
Actually, generic question, any working solution will be a good one.
(just adding & sudo bash rules.sh doesn't do anything: it has to be typed by hand in the terminal).

Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
greerd
Level 6
Level 6
Posts: 1060
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: create_ap and iptable rules

Post by greerd »

Having never used create_ap and not being a programmer I can only speculate the iptables need to be setup according to the Share Method, bridged, None, NAT. See GitHub for the source code.

Shouldn't the script tell you when an AP is created? I would expect that exiting the srcipt will set the iptables to original values? But again, I've never used it.
Locked

Return to “Networking”