fiveworlds Posted November 14, 2018 Posted November 14, 2018 I would like to implement man-in-the-middle to modify sent mongodb tcp requests and add a http header so I can use a dns-redirect on my server. Does anybody know of software that will allow me to do so?
wtf Posted November 14, 2018 Posted November 14, 2018 2 hours ago, fiveworlds said: I would like to implement man-in-the-middle to modify sent mongodb tcp requests and add a http header so I can use a dns-redirect on my server. Does anybody know of software that will allow me to do so? You want to redirect database requests? What are you trying to do exactly? It sounds like using some sort of proxy setup would be simpler. 1
Sensei Posted November 14, 2018 Posted November 14, 2018 Wtf gave good advice to try proxy +1. But if it's truly yours server, on Windows you can simply edit local DNS records in c:\WINDOWS\system32\drivers\etc\hosts file, on Unix /etc/hosts file.
fiveworlds Posted November 14, 2018 Author Posted November 14, 2018 Quote You want to redirect database requests? What are you trying to do exactly? It sounds like using some sort of proxy setup would be simpler. It is a proxy. More specifically I want to proxy mongodb tcp requests. Problem is I can only use nginx and port 8080. Quote But if it's truly yours server, on Windows you can simply edit local DNS records in c:\WINDOWS\system32\drivers\etc\hosts file, on Unix /etc/hosts file. It isn't my server it is a college network they want students to be able to access mlab.com over port 8080 using nginx (only http is allowed over college wifi). I can only send tcp data by using mongo and nginx won't support dns vhosts over tcp. So what I want to do is work around this by putting the mongo requests into a http request with DNS info like mongo.college.edu:8080 and send the http request to the college's Nginx server. The Nginx server would then route the http packet to the local port being used for TCP. I would then man in the middle the packet again removing the http headers and send the TCP packet to mlab.com. All while never exposing port 27017
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now