As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [nat]

In computer networking, network address translation (NAT) is the process of modifying network address information in datagram (IP) packet headers while in transit across a traffic routing device for the purpose of remapping one IP address space into another.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

iptables rules - Forward/Masquerade sevices using nat table

I need to complete an exercise with iptables on a network (docker containers) configured as follows: A router host with 2 network interfaces (eth0 <- public 10.9.0.0/24; eth1 <- lan 192.168.60....
Giuseppe's user avatar
  • 101
0 votes
0 answers
18 views

How to select packets in iptables in nested IPIP tunnel?

I have IPIP tunnel as shown in tcpdump output bellow: IP 192.168.240.112 > 192.168.250.112. Inside this tunnel, there is a traffic in another IPIP tunnel IP 10.233.86.94.35938 > 10.233.100.199....
laimison's user avatar
  • 579
0 votes
0 answers
43 views

Redirect incoming UDP traffic to a local ip adress (iptables?)

tcpdump works as expected on my machine. tcpdump -i enx00e04c04009e -Uw - | tcpdump -en -r - vlan 201 17:52:51.447340 04:01:30:00:00:16 > 03:00:03:00:04:00, ethertype 802.1Q (0x8100), length 66: ...
Aleksandarf's user avatar
0 votes
0 answers
18 views

SSL certificate for subdomain, which is routed to public IP masked on firewall, which navigates to local server

I have a web application hosted on local server. Which we have opened for public use by masking this local IP to public IP provided by ISP. So now website is accessible with public IP. We required to ...
jatz2012's user avatar
0 votes
0 answers
12 views

Iptsbles site to site vpn

I have installed strongswan site-to-site vpn,thats working fine. On server I have configured iptables with this commans iptables -t nat -A POSTROUTING -s 10.9.141.0/24 -d 10.10.27.0/24 -j MASQUERADE. ...
Dave's user avatar
  • 13
3 votes
1 answer
130 views

Google Cloud Engine - Network unreachable (with NAT)

Context & issue We would like to do maintenance on one of our Compute Engine instance (update dependencies via apt update/upgrade), but said instance does not have access to the public internet, ...
Philippe Hebert's user avatar
0 votes
0 answers
44 views

How to create a openvpn server with port forwarding like portmap.io?

I'm currently working on exposing my NAT behind a server to the public using OpenVPN. I've successfully accomplished this by utilizing the portmap.io VPN service, which allows public users to access ...
newbie2math's user avatar
0 votes
0 answers
21 views

NAT Between TUN and Ethernet Network Interfaces

There's a detailed explanation of the setup and my debugging efforts so far, but the main question is at the bottom. I have a setup like so: Machine A has two network interfaces: eth0 (192.168.159.60)...
Jordan's user avatar
  • 117
0 votes
1 answer
39 views

How does this data center setup work? Public gateway IP can route to unique subnet of public addresses?

we haven't been able to figure this out whatsoever, and this data center has no real support that explain how this is working. This is an unfamiliar setup to us but they assure us it's standard for ...
addMitt's user avatar
  • 103
0 votes
0 answers
23 views

Which combinations of NAT requires TURN servers?

I wanna test my Webrtc app, as part of this, I need to test the app with different NAT Types. Here I'm not sure, in which combinations the TURN server is required for the below NAT Types: Full Cone ...
DilLip_Chowdary's user avatar
0 votes
1 answer
106 views

How to setup public ip for proxmox

I have an interesting question. We have in company proxmox VE with public 46.xx.xx.xx/29 and private IP subnets. Proxmox hasn't got public ip and is connected on interaface vmbr0 to router with subnet ...
Dave's user avatar
  • 13
0 votes
0 answers
30 views

IPsec access from multiple local Networks over a single IP Address

I have to connect our company network with the network of a customer to access some of their resources. The IT department of the customer defined a IPsec VPN in tunnel mode with two phase 2 ...
Andreas's user avatar
  • 101
1 vote
1 answer
99 views

firewall masquerade configuration not working

I'm using RHEL 8 and am trying to set-up NAT/MASQUERADE using firewall-cmd. So far I have all the network interfaces and services in the public zone. eno8303 is the internal nic and eno8403 is the ...
PistolPete's user avatar
0 votes
0 answers
22 views

Simulating port/ip translation using IPTables

Case 1: predictable offset port translation If I want to simulate a NAT that maps the internal IP to a constant external address and maps the port to (port+offset), how would I do this using iptables? ...
Thomas Braun's user avatar
0 votes
1 answer
263 views

How to setup a NAT Gateway together with a VPN in AWS

I have a VPN setup following this guide. I connect to the VPN from my Mac and I can confirm that both, my Mac as well as EC2 instances do have access to internet. However, for this to work, all my EC2 ...
Mariano Martinez Peck's user avatar
0 votes
1 answer
154 views

GCP VM (using cloud NAT) loses internet connection

We have a pretty simple setup for the VM on GCP w/o public IP address. To reach the internet, we use cloud NAT (w/ the basic configuration, see attached image): The problem we have is that the VM ...
Giorgi Jambazishvili's user avatar
0 votes
1 answer
680 views

iptables: How to forward UDP and TCP port to server behind wireguard VPN connection

So I have VPS (KVM) server running Debian bullseye with a public IP. That server is also running a wireguard server. At home, I have another server (behind NAT) with a wireguard client that is ...
Tom's user avatar
  • 31
0 votes
1 answer
96 views

SNAT does not work to keep real client IP, MASQUERADE works

I have 3 hosts: AAA, BBB, CCC. Host AAA is an OpenVPN server with IP 172.17.10.1 and mask 255.255.255.0. Host BBB has 2 tun interfaces: • an OpenVPN server with IP 172.16.10.1 and mask 255.255.255.0 •...
inivanoff1's user avatar
0 votes
1 answer
58 views

OpenVPN on AWS (works in NAT mode but doesn't work in Routing mode)

I have a brand new VPC (10.0.0.0/16) with 3 public subnets (pointing to an IGW) and 3 private subnets (with a NAT GW in each). I have deployed an OpenVPN appliance in the public subnet and configured ...
mreferre's user avatar
  • 456
0 votes
0 answers
44 views

Cannot establish connection on two-way comms like SSH on Phase 2 VIP attached to LAN IP using NAT 1:1

As the title say, I cannot establish connection on two-way comms like SSH on Phase 2 VIP attached to LAN IP using NAT 1:1. Phase 1 and Phase 2 is UP. Phase 2 Remote IP is 192.168.1.248 and Local IP is ...
Raul Chiarella's user avatar
0 votes
1 answer
85 views

Why does ip6tables lose packets after PREROUTING to a different interface?

I'm using ip6tables to nat packages to an IP on a different interface (localhost), but all packets sent there are lost. I have the same iptables rules for IPv4 where everything is working fine. Setup ...
pohlarized's user avatar
0 votes
2 answers
60 views

Iptables - Can't get get my custom SNAT rules to work

Simply, I have two networks one for docker and another one for Libvirt. I need to let one container from the docker network to reach out all VMs in the Libvirt network. So, I added an SNAT rule to ...
Taha Adel's user avatar
2 votes
1 answer
381 views

I am unable to access services on the WAN IP from within the network

Normally, this would not be a desired configuration, but I am setting up a NextCloud server, and to validate the domain, it requires that it be able to access it through the public IP address. No ...
Hubert Oliver's user avatar
-2 votes
1 answer
49 views

Hiding subnet from router

Lets say I have a network layout similar to this: What do I need in the ? node so that all of the PC's are not discoverable form the main network, but can access the main network/internet? I don't ...
Primemaster's user avatar
0 votes
0 answers
13 views

Consolidate Azure vnet subnet to use a single outgoing private IP

I am not very strong with networking but I will try to explain. I have a vnet in Azure and inside it a subnet 10.1.0.0/24. Is it possible to setup routing so that every IP from 10.1.0.0/24 would ...
XenAinars's user avatar
1 vote
2 answers
32 views

Filter CGNAT IPs from Log

I want to identify heaavy users on a web API I would like to ignore CGNAT IPs . I looked at https://www.rfc-editor.org/rfc/rfc6598 Is this mandatory or can an ISP use any given IP ? Is there a List ...
jan ohms's user avatar
0 votes
2 answers
561 views

Assigned second public IP to VM from outside not reachable

I have a dedicated server running proxmox with a mixed configuration, NAT based network configuration for all VM's and routed network (brouter according to hetzner docs) (see below) for one particular ...
Leo's user avatar
  • 141
3 votes
2 answers
246 views

iptables 1:1 NAT with reflection second public IP to local IP

I would like to setup a 1:1 NAT + reflection with iptables, so really forward everything which arrives on that one public IP to my internal VM. Background Info: I have a dedicated server running ...
Leo's user avatar
  • 141
0 votes
1 answer
310 views

OpenVPN Server in Windows Server not changing IP address

I am new to OpenVPN. I have been stuck with configuring OpenVPN Server for my Windows Server 2019 datacenter for over a week. I have also configured NAT in Routing and Remote Access and Firewall too. ...
Han Moe Htet's user avatar
0 votes
1 answer
226 views

Apache server on Macos Monterey not accepting external public IP connections... why?

I am using MacOS Monterey 12.4 and have configured an Apache 2.4 server with virtual hosts that listen to all interfaces (0.0.0.0:80) on my host. I have tested my private ip (192.168.1.2), external-...
theptr104's user avatar
0 votes
0 answers
47 views

OpenVpn - connect vpn clients to server subnet / server intranet

We have installed OpenVpn community editon (v2.5.8) in windows server 2019, having multiple VMs running in Intranet (10.0.0.0/24). I want my vpn clients (10.8.0.0/24) to communicate with VMs and VMs ...
Programmer's user avatar
0 votes
0 answers
58 views

pfSense: NAT port range to SSH on several servers using aliases?

In pfSense, is it possible to map several ports to a single port on several machines in a way that each port will target the same port on a different machine using aliases? Here is a scenario and what ...
Martin Braun's user avatar
1 vote
0 answers
34 views

Forward traffic server to another server with iptable and domain

I want to forward all traffic from server1 to server2 with domain same: sysctl net.ipv4.ip_forward=1 iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination IpServer1 iptables -t nat -...
Pinotech LTD's user avatar
1 vote
1 answer
106 views

iptables DNAT on smb port failed, hits on PREROUTING, but no on POSTROUTING

I'm running Ubuntu 20.04. It works well by forwarding http requests directed at port 8080 of the local machine to another machine's port 80. But when I set iptables rules to forward smb requests ...
li_jessen's user avatar
0 votes
1 answer
197 views

Use a virtual Network in PFsense to redirect packages to device in another network

I'm using PFsense and i have this situation: Network Example I have a Pfsens already connected with "Site1" through OpenVPN. I can acess the "Device" normally in Pfsense network. ...
FelipeFonsecabh's user avatar
0 votes
0 answers
271 views

Route traffic to Kubernetes cluster using iptables

I have a kubernetes cluster (currently only 1 node) running on my root server (netcup) and try to route traffic to it. Im pretty bad in networking so hopefully someone can help me. On the cluster ...
Peter C. Glade's user avatar
0 votes
0 answers
102 views

Couldn't reach the virtual machine behind NAT via the white address

I've emulated the simple network in my VMware environment: The host1 is in the internal network 192.186.0.0/24, the host2 is in my home network 192.168.0.0/24. The router has two net adapters in both ...
Ilya Shmadchenko's user avatar
0 votes
1 answer
213 views

How to set up OpenVPN server on Debian to route VPN traffic to the Internet

I am setting up an OpenVPN server on Debian. I have the server configured, and clients can connect - they are assigned IP addresses in the 10.11.22.0/24 range. I have the following in my server.conf ...
Nikki Locke's user avatar
0 votes
1 answer
40 views

How to source NAT on Ubuntu Server when accessing from wireguard interface to access server LAN environment

I have an Ubuntu Server 22.04 which I am accessing from wireguard interface 10.69.69.0/24, But I am having trouble accessing it's LAN environment on 10.0.0.0/24 I understand I need to do some source ...
Matty-Server's user avatar
1 vote
1 answer
179 views

Cannot access website in LAN. NAT Hairpinning in nftables

I am trying to get NAT hairpinning working on my router. I cannot access my local website host on my LAN (192.168.1.3). I am using nftables with the following config: enp1s0 = WAN enp2s0 = LAN #!/sbin/...
whitleystriber's user avatar
0 votes
1 answer
357 views

Static route via nftables firewall

I have a gateway "X" with 2 NICs enp0s3 (192.168.0.100) connected to 192.168.0.0/24 (let's assume this is a WAN network) enp0s8 (172.16.0.1) connected to 172.16.0.0/24 (presumably a LAN ...
asteway's user avatar
0 votes
1 answer
221 views

How is NAT Port Exhaustion handled?

"Port address translation (PAT) resolves conflicts that arise when multiple hosts happen to use the same source port number to establish different external connections at the same time. PAT may ...
Anup Buchke's user avatar
0 votes
1 answer
251 views

proper way of NATing and Routing when using TUN interface with iptables

edit: I'm a newbie in networking and discovering new things :) I created a TUN interface programmatically and able to interact with. I set it up and running by ifconfig myTun 10.10.1.1/24 up and its ...
user3840019's user avatar
0 votes
0 answers
51 views

pf rule for NATting multiple VPN interfaces, how to exclude two physical interfaces?

Situation: VPN server, hosting OpenVPN and L2TP connections. OpenVPN connections share a "utun" interface, one per OpenVPN server process. L2TP connections each get a unique "ppp" ...
JLG's user avatar
  • 21
0 votes
0 answers
21 views

Get source Ip and port - NAT

I routed all my traffic through my code . I used Iptables in Linux to forward all requests which requested 53 port with this command : iptables -t nat -p udp -A OUTPUT -j DNAT --dport 53 --to-...
mwg's user avatar
  • 1
0 votes
1 answer
108 views

How to forward traffic from one LAN router through another router then to the original gateway?

I have two routers connected to my ISP within one town in the subnet 192.168.0.0/24.Router A can reach router B successfully. I have higher bandwidth on router A than B. I would like to make A the ...
frequency ent's user avatar
0 votes
2 answers
115 views

can i able to ip forward and keep original client ip from server A to B?

im web developer and i have not good knowledge about devOps and server config, i use this code for forwarding data from server a to b from client my mean is: client---------->serverA--------->...
Ezioadf2's user avatar
0 votes
1 answer
26 views

Spreading a subnet via VPN

There is 1 network behind FW-A that is already in place, in the subnet 172.16.101.0/24 I would like to establish an IPSec tunnel between FW-A and FW-B,and have devices behind FW-B to also be located ...
Segfault's user avatar
0 votes
0 answers
80 views

iptables bidirectional nat udp configuration for multiple sources

I have the following setup, all udp packets: client (42.123.124.125) -> (42.123.0.125) nat_server (192.168.2.2) -> (192.168.2.5) udp_service nat_server has to receive incoming udp from client ...
Aleh Smalyanau's user avatar
0 votes
1 answer
410 views

Linux randomly routes packets to the wrong interface

I own a dedicated server with some kvm vps running for my clients. My main network is 192.168.1.0/24. The vps have a dedicated network 192.168.2.0/24 on a bridge interface brv6. The ipv6 traffic goes ...
Mathis's user avatar
  • 1

1
2 3 4 5
40