-3

I would like to use 192.168.11.1, but use global IP address againt my will.

I would not like to use global IP address in router when Im usging web browser and client applications.

How do I do ?

Now: my web browser(my global IP address) -> the internet

I'd like to:my web browser(private IP address(192.168.11.1)) -> my global IP address -> the internet

Thank you for reading my question.

My machine. Debian9(kvm and vps)

virtual nic ens3 -> global IP address

virtual nic ens4 -> 192.168.11.1/24

# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.11.1 255.255.255.0 UG 0 0 0 ens4 default {global ip gateway} 0.0.0.0 UG 0 0 0 ens3 localnet 0.0.0.0 255.255.254.0 U 0 0 0 ens3 192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 ens4

# iptables -t nat -A POSTROUTING -s 192.168.11.0/24 -o ens3 -j MASQUERADE

2
  • The topic has been deemed unclear, i do not think it is unclear and i am very against this decision. It's a simple question of NAT / PAT, getting ens4 clients with private addresses out ens3 on his / her public address. Mar 28, 2018 at 16:10
  • 1
    @CristianMatthiasAmbæk IMO What makes it unclear is the OP didn't really say what he is trying to achieve. If we wanted to use 192.168.11.1/24 for internal purposes that would be an easy fix however it looks like he wants to use 192.168.11.1/24 as an external gateway which is not possible. what he could do is something like here serverfault.com/questions/430459/… but we still don't know what he is tying to accomplish. Mar 28, 2018 at 16:18

0

Browse other questions tagged .