LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-06-2020, 05:32 AM   #1
rama12345
LQ Newbie
 
Registered: Aug 2020
Posts: 7

Rep: Reputation: Disabled
The IP Address of The Attacker is not Detected in the Honeypot After Being Forwarded


have a problem with my project. My project is how to deflect the attacker to the honeypot. I tried using the IPTables to forward any IP Address that want to access the protected network to the honeypot IP Address..

In this case I have 3 IP Address.. a. 192.168.43.42 --> It's a Honeypot b. 192.168.43.216 --> It's a Protected Network/System c. 192.168.43.156 --> It's a Attacker

I tried to configure the IPTables like this.. The honeypot that I used is a Kippo SSH. That's why the port is 22

(This command is implented in the protected system --> 192.168.43.216)

#echo "1" > /proc/sys/net/ipv4/ip_forward
#iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination 192.168.43.42
#iptables -t nat -A POSTROUTING -j MASQUERADE

After I tried that, the honeypot can detect the attacker!

But, the IP Address that are detected in the honeypot is the IP Address of the Protected System, not the IP Address of the Attackers. It looks like the protected system is attacking itself ..

Do you know how to show the IP Address of the Attackers? not the IP Address that has the Firewall (Protected System)..

Thank you!
 
Old 08-06-2020, 05:39 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,484

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
You need to NOT use NAT on the IPTables forwarder, you need to just forward the traffic without doing any form of NAT inbound.
 
2 members found this post helpful.
Old 08-06-2020, 06:59 AM   #3
rama12345
LQ Newbie
 
Registered: Aug 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thank you for your answer, I really apreciate it..

And I'm sorry because I'm new in here. I'm sorry if there's something bad or wrong in my question

It means what should I do is do this command?

#iptables -t nat -A PREROUTING -p tcp --dport 22 -j --to-destination 192.168.43.42

Last edited by rama12345; 08-06-2020 at 07:01 AM.
 
Old 08-06-2020, 08:23 AM   #4
rama12345
LQ Newbie
 
Registered: Aug 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
You need to NOT use NAT on the IPTables forwarder, you need to just forward the traffic without doing any form of NAT inbound.
Thank you for your answer, I really apreciate it..

And I'm sorry because I'm new in here. I'm sorry if there's something bad or wrong in my question

It means what should I do is do this command?

#iptables -t nat -A PREROUTING -p tcp --dport 22 -j --to-destination 192.168.43.42
 
Old 08-06-2020, 09:47 AM   #5
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,484

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Read this: https://unix.stackexchange.com/quest...ip-without-nat specifically near the end where the user removes their MASQUERADE rule
 
1 members found this post helpful.
Old 08-06-2020, 11:46 AM   #6
rama12345
LQ Newbie
 
Registered: Aug 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
Read this: https://unix.stackexchange.com/quest...ip-without-nat specifically near the end where the user removes their MASQUERADE rule
Ahhh I seee, thanks for your helpp!! I really apreciate it
 
Old 08-07-2020, 04:04 AM   #7
rama12345
LQ Newbie
 
Registered: Aug 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
Read this: https://unix.stackexchange.com/quest...ip-without-nat specifically near the end where the user removes their MASQUERADE rule
found
Hello, when I tried that, it's same ;(( I really need helpp
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The IP Address of The Attacker is not Detected in the Honeypot After Being Forwarded rama12345 Linux - Security 1 08-12-2020 08:29 AM
[SOLVED] Can someone explain for me this shell script please? (It was detected on my honeypot) haz12 Linux - Security 8 05-02-2016 11:34 AM
LXer: Honeypot Tutorials : Modes and Working of Honeypot LXer Syndicated Linux News 0 07-08-2013 05:20 AM
port is not being forwarded in linux tharsan Linux - Networking 3 02-21-2005 12:48 PM
mac address being forwarded in redhat? meeble Linux - Networking 4 09-11-2004 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration