Skip to main content

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
18 views

pfSense routing issues

Ive got a routing issue on my pfSense box that shows the response to a ping request being routed to a IP in a separate subnet/vlan. 10:25:13.239238 IP 10.2.0.2 > 8.8.8.8: ICMP echo request, id 9374,...
PowerMan2015's user avatar
-1 votes
0 answers
42 views

SSH Timeout Mystery

I have two LANs; one at home and one at a condo. Both LANs use TP-Link Deco routers which can be configured remotely. I have verified that the routers are correctly configure for port forwarding for ...
Buadhai's user avatar
  • 235
-1 votes
0 answers
55 views

In Ubuntu 24.04 How to configure sharing Internet on WiFi with the hosts connected on Ethernet and another Gateway

My SOHO LAN has this structure: WAN (ISP IP) -- Router--LAN(192.168.1.1) with hosts 192.168.1.0/24 One Host is Hypervisor(192.168.2.1 and 192.168.1.20) with three VMs created 192.168.2.10, 192.168.2....
Rama Krishna Majety's user avatar
1 vote
0 answers
37 views

How do I configure 2 public IP addresses on Debian and enable NAT traversal on one?

I got 2 IP addresses from my hosting company, xx.xx.xx.109 and xx.xx.xx.110, both in the same subnet. The subnet mask is 255.255.255.192 and the gateway is xx.xx.xx.20 I have a Proxmox server and ...
WarningSign's user avatar
0 votes
1 answer
51 views

iptables: NAT bridge traffic

Background I have a linux machine with bridge interfaces as shown below... ---{prenat}--> ---{postnat}--> source: 172.25.0.3 source: 192.0.2.1 +---------------...
mc1's user avatar
  • 11
1 vote
0 answers
44 views

NAT router with private IP towards ISP and public IP on the second interface, localhost traffic problem

I need help with the following network and router. Under emergency conditions, I received the following network. The router (Ubuntu) has two interfaces and a DNS function. The private address on the ...
E Malinowski's user avatar
0 votes
0 answers
22 views

How to enable NAT loopback/hairpinning with iptables on router?

I have a HG659b router, and have got shell access to the router, so I can configure the iptables. In the web page, I have configure a port forwarding setup to forward port 37777 to the host 192.168.1....
Jpac14's user avatar
  • 1
0 votes
0 answers
23 views

How to configure DNAT in iptables between host os (FreeBSD) and guest os (Ubuntu 23.10) so that I can use Cloudflare on both the OS

I've just installed the CloudFlare client + GUI on Ubuntu,that I have virtualized with bhyve (the FreeBSD hypervisor). Cloudflare does not work on FreeBSD. The instructions that I have followed are ...
Marietto's user avatar
  • 549
1 vote
1 answer
111 views

How does linux report SNAT port exhaustion [closed]

I would like to monitor a router for potential SNAT port exhaustion. I'm fully aware of how unlikely this is to happen. I would still like to know how I could detect this on my running system. Does ...
Philippe's user avatar
  • 479
1 vote
1 answer
28 views

Packet forwarding from dual stack interface to localhost

I have a linux SUSE host which has both ipv4 and v6 enabled, below are the interfaces:- eth0,app,eth1 however the default route is available for ipv4 via eth0. Kubernetes is running on this host(...
Pranab Das's user avatar
0 votes
0 answers
24 views

How to Allow all NATed traffic from iptables firewall via pfsense (gateway)

I have an iptables firewall (machine 1) and a centos 7 based gateway (machine 2), which is having 2 interfaces (machine-2:int-1) from WAN [/30] and (machine-2:int-2) is LAN [/28] one of the static IP ...
Ratna Kumar's user avatar
0 votes
1 answer
42 views

Use VPN connection only for selected applications

I am trying to follow: https://superuser.com/a/1262250/41337 but I cannot make it work. I do: interface=eth0 down() { ip netns delete myvpn ip link delete vpn0 iptables -D INPUT \! -i ...
Ole Tange's user avatar
  • 35.8k
0 votes
0 answers
27 views

Firewalld is running, I can acccess unallowed kubernetes exposed port?

I have a Kubeadm based Kubernetes cluster. Firewalld is running on all nodes on the cluster. I expose a nginx service via NodePort service, that on theory should be accessible via all nodes on the ...
teoman's user avatar
  • 101
1 vote
0 answers
72 views

NAT table in iptables rules and SNAT

I am new to iptables and I would appreciate some help understanding a specific rule in the nat table of a router. The router's external interface is vlan2 (111.111.111.111) and the internal interface ...
Cattus's user avatar
  • 11
2 votes
1 answer
102 views

nft port forwarding not working on router

I have a machine that serves both as a router and a server. I have several lxc containers on this machine, and want to expose them to both the LAN and WAN. Following https://access.redhat.com/...
byteit101's user avatar
  • 125
0 votes
0 answers
27 views

iptables static routing simple entry (ddwrt)

Im trying to add a policy-based routing entry to my dd-wrt router, the router is in Router mode, not Gateway mode (using my own Ipv4 block) bsaically I wish to redirect traffic to a different gateway ...
user3265051's user avatar
1 vote
2 answers
3k views

Launching docker daemon in Ubuntu 22.04 LTS on WSL-2 fails because of iptables

I'm trying to run docker inside of Ubuntu 22.04.3 LTS running in WSL-2 on my Windows 10 machine. I have followed the instructions here. But it's still not working, I am getting the following error ...
Genku's user avatar
  • 11
1 vote
1 answer
150 views

Ubuntu router using nftables blocking traffic

I'm trying to set up a simple router in Ubuntu. There are two network interfaces: eth0 - a wired network interface connected to the internet, and wlan0 - configured as an AP with IP address 10.0.9.1. ...
Martin Claesson's user avatar
0 votes
0 answers
49 views

Combining DNAT and SYNPROXY in NFTABLES

I have an application that requires DNAT for load balancing and SYNPROXY to mitigate SYN floods. Absent SYNPROXY, I would put the round-robin DNAT into a NAT chain on the PREROUTING hook. However, ...
Dominic's user avatar
-1 votes
1 answer
133 views

How to connect two machines, both behind NAT?

I have two machines, both behind a NAT-ting router, resulting that they can not exchange packets directly. However, I believe such a thing would be still possible over some external help, if the NAT-...
peterh's user avatar
  • 9,848
0 votes
0 answers
321 views

firewalld and NAT

So i have been given a task to get to know firewalld and linux networking in general. This is my test setup: Router and Client are running Debian 12, Laptop Ubuntu 22.04. This setup should accomplish ...
Niko's user avatar
  • 1
0 votes
1 answer
19 views

Iptables forwards the port to another IP and adds access restrictions

I've added the following rules to iptables. -A PREROUTING -p tcp -m tcp --dport 3307 -j DNAT --to-destination 192.168.80.45:330 If I want to add a rule to port 3307, for example, to deny access to ...
user592379's user avatar
0 votes
0 answers
29 views

KVM - Share Vm's Internet access with host (reversed use case)

So if your traffic "must" go via Windows. Setup Linux on PC Create Windows VM VM gets Wifi Dongle (USB-Redirect) Atm, the host (linux) has no internet access. Is there a way to create a ...
user82375897897928347's user avatar
3 votes
1 answer
352 views

NAT router with 2 external WAN IPs A+B and multiple internal LANs: Let 1 LAN use external IP address B, all other A

I have a simple Linux router with multiple NICs and IPv4 forwarding enabled. The router has two static WAN IP addresses, assigned to one interface (eth0, eth0:0). (In the following text, I will ...
MrSnrub's user avatar
  • 135
0 votes
0 answers
66 views

Accessing internet from device connected to AP

I have two interfaces uap0 and eth0 in my embedded Linux device. uap0 acts as an access point for other devices to connect to Linux Device. eth0 interface is connected to my router. And my router is ...
G-Smart's user avatar
  • 11
1 vote
2 answers
62 views

SSH connection from internet through server1 (on internet) to local server2(not on internet)

I got some pain to solve the following problem and I would appreciate some help. I have: Server1 connected to the internet and connected on LAN1 (Debian) Public IP: xx.xx.xx.xx Private IP on LAN1: ...
Waldon's user avatar
  • 11
0 votes
0 answers
251 views

Configuring IPTABLES for Passive FTP Connection through NAT (Forwarding from One PC to Another Using a Second Ethernet Card)

I am trying to connect to an FTP server through a NAT network created by another PC that uses two Ethernet cards. I would like to access via FTP client the second PC's FTP server through the first one....
Giacomo Ornati's user avatar
1 vote
1 answer
953 views

Can I run PIVPN with Wireguard without MASQUERADING?

When installing pivpn on Raspberry Pi it will create an iptables rule: pi@RPi64:~ $ sudo iptables -L -t nat ...
bomben's user avatar
  • 509
1 vote
1 answer
350 views

nftables dnat map rule failing silently

I'm working from the answer of this question and man nft in order to create some dnat rules in my nftables config. The relevant config extract is: define src_ip = 192.168.1.128/26 define dst_ip ...
Synthetic Ascension's user avatar
0 votes
0 answers
527 views

How to make all Windows network interfaces visible (and usable ) in WSL2?

I'm a student, I'm currently working on a project with the goal of integrating MultiPath TCP (MTCP) into WSL2. However, there's a significant challenge we're facing: WSL2 only exposes a single "...
Tiklyt's user avatar
  • 1
0 votes
0 answers
96 views

How is it possible that NAT doesn't back translate packets?

I have the following topology and from myhost I can ping router2 but can't ping router1. With tcpdump I can observe how my pings go and I see that both router1 and router2 reply. But only replies ...
Dims's user avatar
  • 3,285
0 votes
1 answer
177 views

nftables counter for nat'ed traffic

When setting up a counter for a rule in a 'type nat hook prerouting' chain with dnat on a specific port, the counter will only count the initial packet for that rule and the following packets from ...
user3767974's user avatar
1 vote
1 answer
288 views

Can nftables perform postrouting matching on crgroupv2?

I would like to change source address of every packet generated by a process in given cgroup (version 2). Is that even possible? I have: nftables 1.0.2, linux 5.15 (Ubuntu variant) /system.slice/...
sharpener's user avatar
  • 135
1 vote
1 answer
429 views

Packet flow in linux NAT enabled on bridge IP assigned interfaces

On My Linux machine, I have following configuration: br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether bc:e6:7c:51:20:6b txqueuelen 1000 (Ethernet) br0.1: flags=4163<...
RootPhoenix's user avatar
0 votes
0 answers
228 views

iptables rules for transit packets port forwarding (NAT) in both directions (still accepting packets to the current server)

I wrote such rules for forwarding all ports to another server and back, but I don't like that I reserve port 10000 for this. If you do not specify the port, then when receiving requests from 62.105.38....
Maxim Mandrik's user avatar
1 vote
1 answer
637 views

How to configure port forwarding with nftables for a Minecraft server on Raspberry Pi?

Since I'm using a transparent proxy service, I use a raspberry pi as my home router. Its OS is plain Raspbian. Now I'm setting up a Minecraft server on 192.168.2.28, and am exposing it to WAN using ...
AprilGrimoire's user avatar
1 vote
1 answer
534 views

Nftables: Dnat with source address restriction and just one map

Our router machine has multiple public IPs (/27) on its WAN interface. Now, I want to add dnat rules which match specific dport/saddr/daddr combinations. My dream would be something like this: map ...
tobi_b's user avatar
  • 23
0 votes
1 answer
316 views

Enable NAT with TCPMSS using UFW

I could enable NAT using UFW with following configuration. *nat :POSTROUTING ACCEPT [0:0] -A POSTROUTING -s 192.168.141.0/24 -o ens192 -j MASQUERADE COMMIT If I want to enable TCPMSS, I have to run ...
yananet's user avatar
  • 31
1 vote
1 answer
929 views

Set up NAT between Docker networks

My goal is to run two Docker containers on separate networks and have my host (Ubuntu 22.04) perform NAT so that the first network can reach the second. My setup: docker network create network1 docker ...
Daniel Walker's user avatar
1 vote
1 answer
507 views

nftables anonymous map for ipv6 dnat

When creating a dnat rule, you can specify the following command: nft 'add rule ip twilight prerouting ip daddr 1.2.3.0/24 dnat ip prefix to ip daddr map { 1.2.3.0/24 : 2.3.4.0/24 }' And then get ...
Oskar Stenberg's user avatar
0 votes
1 answer
624 views

Using ssh reverse tunnel as gateway to reach machine under NAT

I'd like to reach a machine under a network with NAT and without port forwarding. The machine "closed" behind the no-port-forwarding NAT is called RaspberryB. This machine create a reverse ...
Neopard's user avatar
  • 11
0 votes
1 answer
59 views

Access VM from LAN

On a Linux laptop, I want to give access to locally hosted VM (kvm) from LAN. I'd like to do DNAT to VM. Network client <-- LAN 192.168.3.0/24 --> host <-- bridge 192.168.113.0/24 --> ...
Benoit's user avatar
  • 51
1 vote
1 answer
88 views

Fedora VM behind NAT can not ping host.domain name on intranet

I am using VirtualBox on Windows now. The network is roughly like this: [Fedora 37 VM] -- NAT network -- [Windows Host] ---- intranet ---- internet I use DNS on intranet to resole host.domain names ...
grizzlybears's user avatar
0 votes
0 answers
216 views

How to redirect VM DNS question to host machine localhost dnsmasq

My local network shcema is something like this: internet (WAN) | router host IP (resolv.conf) | | +------- eth0 - br0 - tap0 - VM (resolv.conf) | | ...
schweik's user avatar
  • 1,310
0 votes
0 answers
27 views

Linux user specific virtual networks

We have a linux environment that is used by a number of users. Those users use some software that sends and receives udp socket data. We currently have a configuration file that allows specifying the ...
aj1's user avatar
  • 1
0 votes
1 answer
95 views

Is my local traffic being NAT-ed?

I have two iptables rules like this: # vmbr0 - WAN bridge, vmbr1 - LAN bridge iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3306 -j DNAT --to-destination 10.5.0.250 iptables -t nat -A ...
Kamil's user avatar
  • 749
0 votes
1 answer
142 views

Mysql user connects from gateway IP after turning on port redirection on NAT

I have two containers on virtualization host that has "LAN" bridge (vmbr1) and "WAN" bridge (vmbr0). Virtualization host has public IP (lets assume dummy 123.123.123.123) ...
Kamil's user avatar
  • 749
0 votes
1 answer
2k views

nftables dnat in input chain

I'm trying to redirect all traffic arriving on the firewall on ports 80 and 443 to 10.133.8.11. I gather from this that NATting in an input chain should be possible. But it seems that dnat is not. ...
Philippe's user avatar
  • 479
2 votes
0 answers
454 views

Adding a working ipv6 nat to an existing ipv4 nat

I like to add ipv6 to an existing an working ipv4 nat. It is a proxmox host and the clients are vms. I tried to get it working by adding corresponding files on the nat device (proxmox host). The file /...
sneaky's user avatar
  • 261
0 votes
1 answer
1k views

wireguard server MAQUERADE/SNAT low iptables traffic statistics

I have set up my home Ubuntu 22.04 server as a wireguard server. I connect to it from a Ubuntu 22.04 laptop wireguard client, from the internet through my home network firewall to the wireguard server,...
storestyggeulv's user avatar

1
2 3 4 5
8