-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
Hello there,
I am using python AMQP client for rabbit-server to create exchange, queue, and binding but when I run the code then I can only capture the packets in loopback (lo) interface but I need it the work in other interfaces such as eth0/enps03 in ubuntu. In order to capture packets from another machine such as using Kali Linux to launched an attack on the rabbitmq-server. Since it is working only on loopback interface I can not capture any packets from external for the AMQP protocol.
- [ this is config file: /etc/rabbit/rabbit.config ]
[
{rabbit, [
{tcp_listeners, [{"192.168.1.119", 5672}]}
]}
,{kernel,[{inet_dist_use_interface,{ 192,168,1,119 }}]}
,{rabbitmq_management
]}
].
- [ config environment: /etc/rabbit/rabbitmq-env.config]
export RABBITMQ_NODE_IP_ADDRESS=192.168.1.119
export RABBITMQ_CONFIG_FIEL="/etc/rabbitmq/rabbit"
- [ This is the consumer code I am using for rabbitmq AMQP client in python from here:]
!/usr/bin/env python
import pika
import sys
credentials = pika.PlainCredentials('admin', 'admin')
params = pika.ConnectionParameters(host='192.168.1.119', port=5672, virtual_host='/', credentials=credentials)
connection = pika.BlockingConnection(params)
channel = connection.channel() # start a channel
channel.queue_declare(queue='hello') # Declare a queue
def callback(ch, method, properties, body):
print(" [x] Received " + str(body))
channel.basic_consume('hello',
callback,
auto_ack=True)
print(' [*] Waiting for messages:')
channel.start_consuming()
connection.close()
- [Output of ifconfig: ]
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.119 netmask 255.255.255.0 broadcast 192.168.203.255
inet6 fe80::a751:4020:802d:1152 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:89:3b:84 txqueuelen 1000 (Ethernet)
RX packets 21420 bytes 20688238 (20.6 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9772 bytes 2329037 (2.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 5237 bytes 454654 (454.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5237 bytes 454654 (454.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- [ epmd -names]
epmd: up and running on port 4369 with data:
name rabbit at port 25672
Please help me on this matter as I need it to work on eth0/enps03 interface and thanks a lot in advance.
Metadata
Metadata
Assignees
Labels
No labels