Answer the question
In order to leave comments, you need to log in
How to configure one-to-one on subinterface in Shorewall?
Hello.
Available:
- external interface eth0 with ip addresses from different subnets
- there is an internal interface.
Task: Set up the shorewall like this. So that all traffic from LAN + from the localhost is NATed through IP_A, and IP_B one-to-one in LAN: 1.1.1.1……
I tried using /etc/shorewall/providers, but nothing worked out for me.
Can you tell me how to set it up correctly?
/etc/network/interfaces
# Loopback device:
auto lo
iface lo inet loopback
# device: eth0
auto eth0
iface eth0 inet static
address IP_A
netmask 255.255.255.224
gateway GTW_A
auto eth0:0
iface eth0:0 inet static
address IP_B
netmask 255.255.255.224
#gateway GTW_B
# VirtualBox NAT bridge
auto vnet0
iface vnet0 inet static
address 172.16.0.1
netmask 255.255.255.0
bridge_ports none
bridge_maxwait 0
bridge_fd 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question