Change destination IP

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
MRLU
DD-WRT Novice


Joined: 03 Jun 2017
Posts: 11

PostPosted: Tue Jun 11, 2019 19:23    Post subject: Change destination IP Reply with quote
Please forgive me if this question is silly since I am new to this networking using IPTABLES.

I have a ill-behaved ip camera in my network that tries to phone home to a foreign IP address. I would like to know if I can redirect the IP that it is trying to connect to a different IP.

The source IP on my network is 192.168.1.166 and it is trying to connect to 37.49.231.111 on port 80. Can I change the outbound request to something safe such as 127.0.0.1?
Sponsor
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6447
Location: UK, London, just across the river..

PostPosted: Tue Jun 11, 2019 22:50    Post subject: Reply with quote
or just cut its WAN and access it only from LAN...
this camera shit is well known on the cheap price cam's
they do a router floods, UDP or TCP and they connect to a unknown IP's silently...

iptables -I FORWARD -i br0 -o $(nvram get wan_iface) -p tcp -s ip of camera -j DROP

ip of camera is your local cam's ip address

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum