Questions tagged [nat]

In computer networking, Network Address Translation (NAT) is the process of modifying IP address information in IPv4 headers while in transit across a traffic routing device.

Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

IPtables DNAT with linux bridges (no interface addresses)

I've been doing some experimenting with iptables and bridges, and this scenario is just in a lab, but I've encountered some interesting functionality and would like some explanation as to what is ...
user avatar
  • 97
0 votes
0 answers
17 views

How to route traffic from 2 NIC's on the same PC and more about configuring a switch?

Hey everyone! I hope you guys can help me with a problem I have been struggling with. So, the image describes a network architecture. The PC is running Ubuntu 20.04 Desktop. Port 1 and 2 = Public ...
user avatar
  • 1
0 votes
1 answer
26 views

Virtualbox NAT network not showing in Linux

I am currently Running a Bare Metal Kali with Virtualbox installed on it to the run Kioptrix Level 1. I created a NAT network in preferences with the default recommendations. This did resolve an ...
user avatar
0 votes
1 answer
35 views

macos monterey: PF load anchor syntax error

I am trying to make a NAT interface to connect tap0 to the internet for QEMU. So far I've made a bridge and connected tap0 to it: sudo ifconfig bridge1 create sudo ifconfig bridge1 addm tap0 sudo ...
user avatar
1 vote
1 answer
99 views

GRE IP to virtual machine (Proxmox) - Traceroute showing full route

88.198.49.xxx = Hetzner (will run virtual machines on this) 141.94.176.xxx = OVH (contains block below) 164.132.xxx.0/28 = IP block to use on Hetzner as virtual machines To get GRE set up I ran the ...
user avatar
  • 2,629
1 vote
4 answers
97 views

Can a NAT router run out of ports?

The highest TCP port number is 65535. If a router doing NAT uses an ephemeral port for each connection made to the internet on behalf of the hosts on the internal network, does this mean that it is ...
user avatar
  • 1,942
1 vote
1 answer
77 views

Undoing full cone NAT using IPtables for IPsec

I currently have a free VPS hosted in Oracle Cloud. This machine sits in a so-called "Virtual Cloud Network", which is just a virtual LAN with an address in the range of 10.0.0.0/8 (10.0.0....
user avatar
0 votes
1 answer
23 views

Iptables - Wifi Router User Sessions to OpenVPN in VM

The goal is to route wireless user sessions from a TP-Link TL-WR902AC Wifi travel router on the same LAN to an OpenVPN Client in a virtual machine. My attempt at this is based on previous successful ...
user avatar
1 vote
1 answer
63 views

Local transparent proxy SSLSplit causes forwarding loop

I am trying to debug an application which sends RPCs via HTTPS. In order to read the actual RPC content, I am trying to use SSLSplit on the same machine as the application to MITM the connection. To ...
user avatar
  • 113
0 votes
0 answers
66 views

Configuring NAT for the TAP interface

I am trying to configure NAT with nftables for the TAP interface as follows: table ip vm_nat { chain vm_prerouting { type nat hook prerouting priority dstnat; } chain ...
user avatar
0 votes
1 answer
36 views

How to restrict DNAT to just one of the public IPs?

On a hypervisor with multiple public IPs on a single network interface, there are two groups of Virtual Machines. Group A members get their public IP routed to them directly via the host interface (...
user avatar
  • 161
1 vote
0 answers
12 views

Why does my virtualbox gateway duplicate SYN packets?

I'm trying to set up port knocking using iptables on a Debian server hosted by VirtualBox on my Ubuntu machine. For some reason, when I knock on a port on the server from the host machine, this knock ...
user avatar
  • 11
0 votes
0 answers
82 views

Redirect trafic to host toward an internal VM with nftables does not works

My issue is the following : On an ubuntu 20 host . i got some multipass hypervisor and VMs, that i want to be able to reach from the outside. physical host : eth1 192.168.10.33/16 vm : mpqemubr0 10....
user avatar
  • 1
0 votes
0 answers
36 views

iptables port forwarding not working under switch

I'm making my own Linux router, and want to set portforwarding to my second PC. The current setup is eth1, PC 1, PC 2 and they're all connected to the same switch. WAN -> eth0 (Linux), eth1 (Linux) ...
user avatar
0 votes
1 answer
19 views

On CentOS when I statically assign on ip address to my second interface , my primary nat interface does not work

When I statically assign an IP address to my second interface , my primary NAT interface does not work. I am new to Cent OS and I am using NAT and when I change the second interface statically , my ...
user avatar
  • 11
1 vote
1 answer
711 views

iptables forward traffic from/to wireguard

Consider the following setup. I have a VPS that is connected to the internet, having a fixed IP. Further, in my home network, behind a NAT router, I do have my home network with several hosts. My home ...
user avatar
  • 430
0 votes
0 answers
236 views

GRE tunnel & NAT port forwading

Scenario: Server 1 Public IP: XXX.XXX.XXX.XXX (vmbr0) Proxmox host multiple LXC instances which are NATed LXC containers in range 10.0.0.0/24 (vmbr2) Each IP from private range has 50 ports on public ...
user avatar
  • 1
0 votes
1 answer
77 views

IPTables - 2 Nics - Private - Public - Private route

I have a CentOS 7 with 2 NICs (enp1s0 - private LAN 192.168.0.0/24 and enp0s29u1u1 - public) that I use as a gateway / router via iptables. All PCs on the private LAN connect to the internet via the ...
user avatar
  • 1
0 votes
0 answers
11 views

ping to window VMHost from LAN Host

I have a linux opensuse which host inside a laptop windows vmware named "A", I have another laptop named "B" which connect to "A". I'm fails to ping "A" vmhost -...
user avatar
  • 1
0 votes
1 answer
349 views

MASQUERADE doesn't work - the response packets are lost

According to tcpdump, the initial packet from the VPN client gets its source address translated and sent to the destination and the response packet arrives, but this response packet is just lost. I ...
user avatar
  • 1,801
0 votes
0 answers
48 views

SNAT with iptables not working in Ansible + Vagrant scenario

The scenario: The client has a modified default route, so it goes out through eth1, and the router needs to forward the traffic (SNAT). I followed this to accomplish it: https://askubuntu.com/...
user avatar
1 vote
1 answer
335 views

nftables table and chain priority

I have a problem with my nftables setup. I have two tables, each one has a chain with the same hook but a different name and priority. The tables are in different files which are loaded by an include ...
user avatar
0 votes
0 answers
133 views

NAT specific host through the WAN interface, and all the rest through VPN tunnel interface

Here's a debian-based Linux router with 3 interfaces eth1: WAN (192.168.100.0/24) tun0: VPN interface (10.8.0.0/24) created over eth1 eth0: LAN (192.168.0.0/24) In the past, I had activated the NAT ...
user avatar
0 votes
1 answer
124 views

TCPDUMP w/SNAT Configuration Shows Private IP on ICMP Reply

Problem: TCPDUMP icmp reply inexplicably has the private address. I would expect it to have the public address. [router.box(1.2.3.4)]$ tcpdump -n -i br1 icmp 10:42:21.689215 IP 1.2.3.4 > 8.8.8.8: ...
user avatar
  • 101
2 votes
1 answer
397 views

SSH connections frequently disconnected when using a mobile hotspot for internet access

My ssh sessions are frequently disconnected when I use a provider that offers internet service via cellphone towers. They seem to "freeze" and stop responding to anything I've typed, but ...
user avatar
1 vote
1 answer
298 views

How to set up NAT of VPN-sourced ip packets?

I have an SBC running Arch Linux that I use as a VPN server (as it is the only device having a globally accessed IP address not NATed by ISPs) to connect three different networks. These are 192.168.0....
user avatar
-3 votes
1 answer
81 views

NAT Forwarding and DNS

I’m new to Linux but as part of a commercial project I need to configure the firewall to redirect via NAT and DNS. For example, I have traffic going to www.A_DOMAIN.com:9000 (DNS translates to my ...
user avatar
0 votes
1 answer
201 views

Provider NAT traversal using OpenVPN server

I have a configured OpenVPN server with access to global internet and a connection with a server that is under NAT. I need to achieve that, for example, when requesting a tcp port 2000 of a server ...
user avatar
0 votes
1 answer
222 views

Forward inbound traffic from an interface to a docker container

I have to forward the traffic having source 192.168.72.0/28 from eth0 of my machine to a container running on the same machine having address 172.7.0.4 and running in bridge mode. I have tried adding ...
user avatar
  • 243
0 votes
2 answers
154 views

Ubuntu routing problem between two physical ports

Looking to solve a problem on: Ubuntu 18.04.5 Intel i3 I have two physical ports (enp1s0 & enp2s0), a router connected to enp1s0 and a camera on enp2s0. enp1s0 is 192.168.1.10 Router connected ...
user avatar
0 votes
1 answer
557 views

Router with nftables doesn't work well

I have Debian 4.19.194-1 as a router server with LAN, WAN, PPPOE (as gateway) and COMPUTER1 in LAN network which should have access to internet through Debian router. As firewall I use nftables with ...
user avatar
1 vote
1 answer
137 views

iptables - allow forward rules by set

i'm building an captive portal (yeah, just-another ;) ) and now i try to handle the core feature, the iptable rules. based on ipset i have an list of valid mac-addresses with name allow-mac. so this ...
user avatar
  • 113
0 votes
1 answer
70 views

IP forwarding, masquareding, NAT

I have one physical interface eth0 on my target, running Linux. The IP address of this interface is 172.16.81.x (public IP). I have to create a virtual interface eth0:1 with IP address 173.1.1.x. I ...
user avatar
  • 3
1 vote
0 answers
139 views

How to logging IP address with firewalld SNAT?

I try to setting up SNAT with firewalld on my CentOS 8 PC to make NAT router like below. Users access to the Web Server via CentOS8. [UserPC]---(192.168.0.0/24)---[CentOS 8]---(10.0.0.0/24)---[Web ...
user avatar
  • 11
0 votes
0 answers
44 views

route traffic from LAN to the internet via a raspberry pi

I have a cluster of raspberry pis and I have one RPi acting as a NAT (called piNAT). The piNAT is connected to the internet and is also connected to the cluster of raspberry pis successfully. They are ...
user avatar
0 votes
1 answer
45 views

SSH breaking using 1 to 1 static nat

So i have a virtual machine in a private internal network on 192.168.200.0/24 with an ip address of 192.168.200.2. The external network is 192.168.1.0/24. I would like to forward all traffic on an ...
user avatar
  • 131
-4 votes
1 answer
41 views

"ping 10.26.14.16" is successful. "nmap -p 5016 10.26.14.16" is unsuccessful. Why?

192.168.1.*/27 : | +--- FW | +--- [192.168.1.133] A | +--- [192.168.1.140] B | : A = linux machine as a router [192....
user avatar
  • 13
-4 votes
2 answers
59 views

Linux as a router to forward

How to make an OpenStack instance to forward route to another Linux machine which is not OpenStack instance but in the same LAN? PC_A has 192.168.1.133/27. PC_B has 192.168.1.140/27. PC_A has 10.26....
user avatar
  • 13
0 votes
0 answers
35 views

Can't access device behind Double NAT LAN

I've got a few devices on my LAN running different Linux distros: Ubuntu 20.04 CentOS 7 Fedora 33 They're all in the same subnet 192.168.50.0/24. Network map: Until recently, from my PC (192.168....
user avatar
0 votes
1 answer
503 views

How to connect to VM with NAT via SSH protocol? (Qemu/KVM)

I need your advice. Brief to my question: I got two Linux/Ubuntu 18.04 Lts. machines. First one is the host(SSHD) and has a VM machine installed on it(virtual machine's ethernet is configured as NAT: ...
user avatar
0 votes
2 answers
42 views

virtual gateway via NAT

I have following networking setup: Gateway: Internet <-- eth0 : a.b.c.d (static address) Clients <-- eth1 : DHCP at server at 172.16.0.1, leasing 172.16.0.0/24 Client: Gateway <-- eth0: 172....
user avatar
  • 115
0 votes
0 answers
94 views

SNAT/Masquerade not modifying the Source IP occasionally

We do SNAT in our system in the POSTROUTING chain. But we find that once in a while the source IP did not get modified. The packet is going out with the internal IP. We are using IP Tables version - 1....
user avatar
3 votes
1 answer
277 views

How to set hard conditions for source nat rules in nftables?

There is only one table on the server - "nat" and it contains only two chains: "prerouting" and "postrouting". IP forwarding is enabled. I'm trying to set more specific ...
user avatar
  • 57
0 votes
0 answers
562 views

simple ipfw configuration with nat on FreeBSD with two nick and dhcp

anyone can write down a simple ipfw configuration with nat and two nick with dhcp ? This is my configuration: ue0 --> dhcpd server and lan ue1 --> dhclient and internet with other router And ...
user avatar
  • 156
1 vote
1 answer
224 views

How to set up stateless NAT for two UDP connections from a global network to special network namespace?

There is the requirement to set up a stateless NAT for two UDP connections from a physical network adapter in global network namespace via a linked pair of virtual network adapters to a service ...
user avatar
  • 111
1 vote
1 answer
707 views

Differences in networking between QEMU/KVM and VirtualBox

I noticed the following differences in the networking experience between QEMU/KVM (used through libvirt) and VirtualBox: For anything else than usermode or manual networking, QEMU/KVM needs a virbr0 ...
user avatar
  • 430
1 vote
0 answers
181 views

Proxy? Port forward?

So I'm looking for a simple solution in the form of a stand-alone middleman service to run on Ubuntu on a headless Raspberry Pi, listen on port 80 and forward the traffic from that, to and from an ...
user avatar
  • 11
0 votes
0 answers
25 views

NAT: change dst ip or port based on src ip

Is there such option to change the destination ip / port if traffic arrives from specific source ip?
user avatar
0 votes
0 answers
175 views

IPTables/Docker setup routing packets to INPUT chain instead of FORWARD

I am running several installations with docker and iptables in place. One purpose of these installations is the forwarding of syslog messages. From time to time I experience outages in that network ...
user avatar
0 votes
0 answers
175 views

How to use ssh with slirp to reach out Internet from a limited jump server?

Sorry that I might be wrong, yet I have some impressions from QEMU that SLIRP has the ability to do both ppp server and NAT stunt the same time. The situation is, I'm under a very limited network ...
user avatar

1
2 3 4 5
7