Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [iptables-redirect]

The tag has no usage guidance.

1 vote
0 answers
15 views

Redirect socks to another interface with nftable

I want to redirect the tcp port to interfaceX , to new destination : ip 192.168.3.8 on interfaceY with nftable rules. I tried that: nft flush ruleset nft add table ip nat nft add chain ip nat ...
python3.789's user avatar
0 votes
1 answer
10 views

Inquiry on how to set up the bypass function through 2 lan ports in a pc

I have 2 LAN ports on the server (eth0, eth1). I want to export the packet that came from eth0 to eth1. Additionally, I want to make it work in the opposite direction at the same time. Is it possible?
Yong Jung Jeon's user avatar
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
1 vote
0 answers
108 views

How to forward packets between net namespaces?

I have a lima VM with linux running Ubuntu 23.04 with kernel 6.2 and cgroupsv2. This VM is meant to serve as docker host. When I create docker network in this VM I get an interface in its own ...
Patryk's user avatar
  • 14.3k
0 votes
2 answers
62 views

Any way to redirect/tunnel HTTP stream from LAN1 to LAN2 through Raspberry?

I have a usual local (192.168.1.x) network with multiple devices and the router with internet connection. One of the devices is a Raspberry (192.168.1.2) connected via WiFi. It also connected to the ...
djoker16's user avatar
0 votes
1 answer
853 views

IPtables UDP port PREROUTING not working

On Ubuntu 22.04 I am trying to render the incoming traffic of a certain port to another ip address. I have redirected several TCP ports with this command and they all work correctly: iptables -t nat -...
Nicola's user avatar
  • 1
0 votes
0 answers
30 views

How can I isolate my firewall rules in a chain such that I can reset them separately?

I've been running some iptables rules for a while, which are (I hope) fine, no issues so far. Here's a snippet of that # Block all input and forward traffic, both IPv4 and IPv6 iptables -P INPUT DROP ...
The Quantum Physicist's user avatar
0 votes
1 answer
595 views

How can I copy all traffic on a network and forward it to another IP address?

I'm trying to use iptables. I'm simulating a network with Mininet. I currently have a router connecting two subnets (10.0.1.1/24 and 10.0.2.1/24). If I use these two iptables rules on the router I see ...
Luigis94's user avatar
0 votes
1 answer
655 views

Forward a request from Server A to Server B by Port

i'm not sure about the right terminology, but try to redirect Traffic from Server A to Server B. I have the following Resources: A DNS Record Type A pointing to the Server A's IP address, e.g.: abc....
TheDomis4's user avatar
0 votes
1 answer
366 views

lxc containers can ping host and can resolve dns internet addresses but cannot get to the internet

Debian Buster amd64 Two containers, 192.168.122.2,3 both can resolve but cannot get to the Internet Both containers can ping / interact with the host server. Here is what I have in iptables. # ...
Wilhelm de Fheur Gorm's user avatar
0 votes
1 answer
202 views

Iptables forward port traffic to another port with byte calculation

Problem I want to 'redirect' traffic from one port to another. But I need to be able to calculate how much INPUT AND OUTPUT bytes were used in communicating through that port. Half Solution iptables -...
Modestas's user avatar
0 votes
0 answers
194 views

Re-write source IP to vlan tagged IP

My setup is as follows: PC1: IP of normal interface 10.0.0.11 IP of vlan interface 11.0.0.11 PC2: IP of normal interface 10.0.0.12 IP of vlan interface 11.0.0.12 I can ping 11.0.0.12 with no ...
Lusani's user avatar
  • 1
0 votes
0 answers
219 views

iptables routing on multiple virtual interfaces

I have 1.1.1.1 outside, which is the public interface of vm1 in azure. VM1 has 192.168.1.1 an internal IP. In addition there's also 1.1.1.2 (virtual) which is attached to the same interface and is ...
rusokiwi's user avatar
-1 votes
1 answer
1k views

Forwarding ports from one device to another, on different networks

My network setup consists of 3 computers (devices A, B, C). Devices A, B, and C are connected through ethernet using a switch. Only device A has internet access (wifi router, with ports 8000-8002 ...
tonyvas's user avatar
0 votes
1 answer
157 views

Rerouting incoming packets from server to local machine B instead of A

I'm trying to redirect a server's incoming TCP packets to local machine B. The application client on local machine A (192.168.0.7) is connected to the server (1.2.3.4), so every incoming TCP packet ...
KoyaCho's user avatar
  • 31

15 30 50 per page
1
2 3 4 5