All Questions
189
questions
0
votes
1
answer
7
views
NAT table skipped for server replies running inside Docker container
I have a Docker container running on a vanilla setup which listens on port 9999:
docker run --rm -it -p 9999:9999 busybox nc -vvl -p 9999 0.0.0.0
I added a LOG rule to the POSTROUTING table on NAT in ...
0
votes
0
answers
24
views
Wireguard share LAN hosts
I the following setup (picture)
I have wg connection between my home router (as client) and Linode VPS (as server). I want to access LAN hosts from Android phone (connects as wg client to VPS). All ...
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
+---------------...
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 ...
0
votes
0
answers
24
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....
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 ...
1
vote
0
answers
74
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 ...
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 ...
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 ...
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 ...
3
votes
1
answer
356
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 ...
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 ...
0
votes
0
answers
256
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....
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....
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 ...