add suggestions from a268wang
This commit is contained in:
parent
60664d3f1d
commit
3e6247e181
|
@ -43,6 +43,21 @@ socat TCP-LISTEN:80,fork TCP:192.168.100.52:80
|
|||
This will forward requests to port 80 on the VM to port 80 in the
|
||||
mail container.
|
||||
|
||||
Alternatively, you can use iptables:
|
||||
```
|
||||
iptables -t nat -A PREROUTING -s 192.168.122.0/24 -p tcp --dport 80 -j DNAT --to-destination 192.168.100.52
|
||||
```
|
||||
Replace '192.168.122.0/24' by the subnet of your VM (your physical host
|
||||
should also be on this subnet), and replace '192.168.100.52' by the IP
|
||||
of the mail container.
|
||||
To make sure this iptables rule is applied automatically at startup,
|
||||
you can install the iptables-persistent package:
|
||||
```
|
||||
apt install iptables-persistent
|
||||
```
|
||||
You can use `dpkg-reconfigure iptables-persistent` if you ever need to
|
||||
change the iptables rules which are applied at startup.
|
||||
|
||||
Now open `/etc/hosts` on your computer and add the following entry:
|
||||
```
|
||||
192.168.122.225 mailman.csclub.internal
|
||||
|
|
|
@ -18,7 +18,7 @@ iface lxcbr2 inet static
|
|||
```
|
||||
Then:
|
||||
```
|
||||
ifup lxcbr1
|
||||
ifup lxcbr2
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
|
Loading…
Reference in New Issue