iptables lanspoof dhcp

Kernels & Hardware, configuring network, installing services

iptables lanspoof dhcp

Postby dreclauw » 2018-09-25 04:32

On my lan with static ip i use this iptables rule for anti lanspoof:
iptables -A INPUT -i wlan0 -s 192.168.1.0/24 -j LANSPOOF

When connected to a hotspot with dhcp, and want to set the same anti lanspoof, my local ip changes for example: 162.19.63.81 to 162.19.27.82
the first two numbers stay the same 162.19 then the last two numbers change.
iptables -A INPUT -i wlan0 -s 162.19.(because this number changes, what do i put here?).0/24 -j LANSPOOF

i did try to set for 0.0.0.0/24 and 0.0.0.0 but then the anti spoof did not work.
so what ip do have to use: 162.19.?.0/24
dreclauw
 
Posts: 2
Joined: 2018-09-25 04:18

Re: iptables lanspoof dhcp

Postby p.H » 2018-09-25 07:12

dreclauw wrote:On my lan with static ip i use this iptables rule for anti lanspoof:
iptables -A INPUT -i wlan0 -s 192.168.1.0/24 -j LANSPOOF

What is the purpose of this "anti lanspoof" rule ?
What is the contents of the LANSPOOF chain ?

dreclauw wrote:When connected to a hotspot with dhcp, and want to set the same anti lanspoof, my local ip changes for example: 162.19.63.81 to 162.19.27.82

162.19.63.81 is bigger then 162.19.27.82.
p.H
 
Posts: 602
Joined: 2017-09-17 07:12

Re: iptables lanspoof dhcp

Postby dreclauw » 2018-09-25 16:04

p.H wrote:
dreclauw wrote:On my lan with static ip i use this iptables rule for anti lanspoof:
iptables -A INPUT -i wlan0 -s 192.168.1.0/24 -j LANSPOOF

What is the purpose of this "anti lanspoof" rule ?
What is the contents of the LANSPOOF chain ?

dreclauw wrote:When connected to a hotspot with dhcp, and want to set the same anti lanspoof, my local ip changes for example: 162.19.63.81 to 162.19.27.82

162.19.63.81 is bigger then 162.19.27.82.


Hello p.H,

The purpose of the lanspoof rule is to drop all connections on the set ip range.
The contents of the LANSPOOF chain is set to: DROP

the ip i posted was just a made up ip, what i try to point out is that the last two 162.19.X.X change, where before on my lan only the last 192.168.1.X changes.
dreclauw
 
Posts: 2
Joined: 2018-09-25 04:18

Re: iptables lanspoof dhcp

Postby p.H » 2018-09-25 22:02

dreclauw wrote:The purpose of the lanspoof rule is to drop all connections on the set ip range.

How is this related with spoof ?

dreclauw wrote:last two 162.19.X.X change, where before on my lan only the last 192.168.1.X changes.

Change the prefix length from /24 to /16.
p.H
 
Posts: 602
Joined: 2017-09-17 07:12


Return to System configuration

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable