Normally, to burn an ISO to a disk, let's say an ISO for installing Ubuntu, we dd to the /dev/sda
, not to the partition like /dev/sda1
, so in this case, where the target file is /dev/sda
which is presumably the entire disk, does it make any sense to partition first? Wouldn't the iso contain the partitions?
Guerlando OCs's questions
I am generating an OpenVPN configuration for my server. I want clients to be able to access my server's router, which is 192.168.1.1, as well as the local network, so I pushed this route:
192.168.1.1/24
and then imported the OVPN file on my Windows OpenVPN client (the official one).
On my Windows, it works. On other Windows (from my father's computer), it connects but I can't access 192.168.1.1. I end up acessing the local router, not the remote one.
Somebody said on OpenVPN forum that I shouldn't add 192.168.1.1/24
. Why? How should I do it then?
I have the following docker-compose:
version: '3'
services:
mitmproxy:
image: johnmccabe/mitmweb
container_name: mitmproxy
command: --cadir /ca --wiface 0.0.0.0
restart: always
ports:
#- "8080:8080"
- "8081:8081"
python:
image: python
build: ./python-socks-example
command: python3 /home/project/socks-example.py
volumes:
- ./python-socks-example:/home/project/
depends_on:
- mitmproxy
container_name: python
restart: always
I want my python HTTP requests to go through mitmproxy on the other container. Here's the python code:
import requests
import time
while(True):
time.sleep(5)
print("gonna connect")
resp = requests.get('http://google.com',
proxies=dict(http='socks5://user:[email protected]:8080',
https='socks5://user:[email protected]:8080'))
print(resp)
print("done")
time.sleep(2)
How can I wire the network of python
to go through mitmproxy
container?
I found a script that starts qemu with this option:
-device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
how do I connect to this machine? I want to SSH into it. I tried seeing the IP address inside the machine and SSHing to it from the host, but it doesn't work, and also they don't even share the same subnet.
I want to route 0.0.0.0:22 to 192.168.122.179:22 which is a VM. This way I can access my VM through SSH by typinh the local IP of the host machine. However i get connection refused if I try to ssh from host to vm, or even (obviously) from local machine to host to vm,
root@z:/home/lz# iptables -t nat -A PREROUTING -i eth1 -d 0.0.0.0 -p tcp --dport 22 -j DNAT --to-destination 192.168.122.179:22
root@z:/home/lz# iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- eth1 * 0.0.0.0/0 0.0.0.0 tcp dpt:22 to:192.168.122.179:22
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
1161 89206 LIBVIRT_PRT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain LIBVIRT_PRT (1 references)
pkts bytes target prot opt in out source destination
5 340 RETURN all -- * * 192.168.122.0/24 224.0.0.0/24
0 0 RETURN all -- * * 192.168.122.0/24 255.255.255.255
39 2340 MASQUERADE tcp -- * * 192.168.122.0/24 !192.168.122.0/24 masq ports: 1024-65535
6 456 MASQUERADE udp -- * * 192.168.122.0/24 !192.168.122.0/24 masq ports: 1024-65535
0 0 MASQUERADE all -- * * 192.168.122.0/24 !192.168.122.0/24