Sponsored Content
Special Forums IP Networking How to route packets back to incoming interface? Post 302993373 by flyingwalrus on Thursday 9th of March 2017 08:46:03 AM
Old 03-09-2017
Quote:
Originally Posted by jim mcnamara
I don't quite get what you are trying to do. Maybe you want TAP - bridge from eth1: to eth0: Which you not have now. In other words segregate and bridge on this server. Is this box in the DMZ?
Mmmh. Ok let me try to eplain it...

The server hast 1 NIC (eth0) and is connected to the internet. There are several daemons running on it (Apache, FTP, ...). Now from time to time a script running on the machine has to connect by openvpn to some other servers of which I know only the domain name not the ip addresses because they change they rotate ips due load balancing and also have alot of IP ranges.

Now when script opens up a openvpn link (tun0) to connect to a openvpn host, all traffic of my server is then routed over the tun0 gateway. Therefor if some client tries to reach the Apache daemon under it's common address, he get's no reponse, because the reponse packet are not sent back on the eth0 interface but the tun0 route. So no more connection to the daemons are possible anymore until the openvpn connection is closed.

What I want now, is that the server responds to any ip packet it gets, on the same interface it was received. When the vpn link is up, all outgoing packets of tcp/udp traffic which were initiated by the server itself have to be routed to tun0, all answers on incoming packets on eth0 have to be answered to eth0.

Does this make any sense to you? Smilie
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

~ IPTables : Limit Incoming UDP Packets With a Certain Length ~

Hello, I am currently trying to limit incoming UDP length 20 packets on a per IP basis to 5 a second using IPTables on a Linux machine (CentOS 5.2). Basically, if an IP is sending more than 5 length 20 UDP packet a second to the local machine, I would like the machine to drop the excess... (1 Reply)
Discussion started by: tomboy123
1 Replies

2. Solaris

Had to bounce interface to add network route

Hi All, yesterday I was trying to add a network route to my solaris 8 host using 'route add'. Everytime I tried, I kept getting the response 'network is unreachable'. I was trying all kinds of different methods, however I eventually got it to work after bouncing the interface that I was... (2 Replies)
Discussion started by: badoshi
2 Replies

3. Solaris

Route new network interface Solaris 8

Hi there, I'm trying to configure an additional network interface on Solaris 8 (eri0). The interface has been activated, but all the frames are still routed to the current default interface (ce0) I've tried following command (with various syntaxes...) unsuccessfully so far: # route add... (2 Replies)
Discussion started by: sreiniche
2 Replies

4. UNIX for Dummies Questions & Answers

Linux box drops the incoming packets

Hi all, I am new to Linux kernel. we have a c file that counts the no. of sends and received packets in each interface, and indicate the user about the error/drop ration of incoming and outgoing packets. in our Linux box , the incoming packets are dropped at random interval. we have our... (1 Reply)
Discussion started by: kannandv
1 Replies

5. Solaris

Network interface down after adding static route

Please , I have a problem I have add a statis route on Solaris 10, but after this, the network interface of Server was Offline. The system is in cluster mode (3.2) route add -net 10.10.1.128 -netmask 255.255.255.128 10.10.1.51 ------------------- lo0:... (1 Reply)
Discussion started by: Ruggero
1 Replies

6. Solaris

route and interface configuration in solaris

Hi, Every time when i boot my system i have to manually issue the following commands. ifconfig elxl0 plumb 192.168.200.129 netmask 255.255.255.0 up route add default 192.168.200.1 I need some help so that it should be configured permanently and i wouldn't have to manually issue... (2 Replies)
Discussion started by: malikshahid85
2 Replies

7. IP Networking

how to hack linux driver to delay incoming packets

hello, can anyone suggest how to delay the incoming packets ?? or how the packets are prossed inside the kernal and a way to make the packets wait a while?? it wud be vry helpful regards sameer (7 Replies)
Discussion started by: sameer kulkarni
7 Replies

8. Linux

how to allow incoming UDP packets with iptables

I am looking for an iptables command to allow incoming UDP packets for my Linux server also is there a command I can use to set the default action for outgoing packets to accept? Thank you (1 Reply)
Discussion started by: crimputt
1 Replies

9. IP Networking

Route packets over specified interface

Hi, I'm quite new to unix networking and ip tables. I'm running a debian (htpc) server with two NIC's; eth0 and wlan0. I'm trying to set it up in a way that eth0 is the default interface for internet, but some processes should run through wlan0. For example, I'm using eth0 for downloads... (2 Replies)
Discussion started by: Subbeh
2 Replies

10. IP Networking

How to route all incoming packets from one virtual interface?

Hello, I'm trying to route all packets arriving at a particular interface by entering the same interface the virtual interface eth1: 2 and now everything is routed by default gw configured on eth1. eth1 Link encap:Ethernet HWaddr 0a:0e:64:18:52:72 inet addr:192.168.10.15 eth1:2 ... (1 Reply)
Discussion started by: faka
1 Replies
PPPOE-RELAY(8)						      System Manager's Manual						    PPPOE-RELAY(8)

NAME
pppoe-relay - user-space PPPoE relay agent. SYNOPSIS
pppoe-relay [options] DESCRIPTION
pppoe-relay is a user-space relay agent for PPPoE (Point-to-Point Protocol over Ethernet) for Linux. pppoe-relay works in concert with the pppoe client and pppoe-server server. See the OPERATION section later in this manual for details on how pppoe-relay works. OPTIONS
-S interface Adds the Ethernet interface interface to the list of interfaces managed by pppoe-relay. Only PPPoE servers may be connected to this interface. -C interface Adds the Ethernet interface interface to the list of interfaces managed by pppoe-relay. Only PPPoE clients may be connected to this interface. -B interface Adds the Ethernet interface interface to the list of interfaces managed by pppoe-relay. Both PPPoE clients and servers may be con- nected to this interface. -n num Allows at most num concurrent PPPoE sessions. If not specified, the default is 5000. num can range from 1 to 65534. -i timeout Specifies the session idle timeout. If both peers in a session are idle for more than timeout seconds, the session is terminated. If timeout is specified as zero, sessions will never be terminated because of idleness. Note that the idle-session expiry routine is never run more frequently than every 30 seconds, so the timeout is approximate. The default value for timeout is 600 seconds (10 minutes.) -F The -F option causes pppoe-relay not to fork into the background; instead, it remains in the foreground. -h The -h option prints a brief usage message and exits. OPERATION
pppoe-relay listens for incoming PPPoE PADI frames on all interfaces specified with -B or -C options. When a PADI frame appears, pppoe- relay adds a Relay-Session-ID tag and broadcasts the PADI on all interfaces specified with -B or -S options (except the interface on which the frame arrived.) Any PADO frames received are relayed back to the client which sent the PADI (assuming they contain valid Relay-Session-ID tags.) Likewise, PADR frames from clients are relayed back to the matching access concentrator. When a PADS frame is received, pppoe-relay enters the two peers' MAC addresses and session-ID's into a hash table. (The session-ID seen by the access concentrator may be different from that seen by the client; pppoe-relay must renumber sessions to avoid the possibility of duplicate session-ID's.) Whenever either peer sends a session frame, pppoe-relay looks up the session entry in the hash table and relays the frame to the correct peer. When a PADT frame is received, pppoe-relay relays it to the peer and deletes the session entry from its hash table. If a client and server crash (or frames are lost), PADT frames may never be sent, and pppoe-relay's hash table can fill up with stale ses- sions. Therefore, a session-cleaning routine runs periodically, and removes old sessions from the hash table. A session is considered "old" if no traffic has been seen within timeout seconds. When a session is deleted because of a timeout, a PADT frame is sent to each peer to make certain that they are aware the session has been killed. EXAMPLE INVOCATIONS
pppoe-relay -C eth0 -S eth1 The example above relays frames between PPPoE clients on the eth0 network and PPPoE servers on the eth1 network. pppoe-relay -B eth0 -B eth1 This example is a transparent relay -- frames are relayed between any mix of clients and servers on the eth0 and eth1 networks. pppoe-relay -S eth0 -C eth1 -C eth2 -C eth3 This example relays frames between servers on the eth0 network and clients on the eth1, eth2 and eth3 networks. AUTHORS
pppoe-relay was written by David F. Skoll <dfs@roaringpenguin.com>. The pppoe home page is http://www.roaringpenguin.com/pppoe/. SEE ALSO
adsl-start(8), adsl-stop(8), adsl-connect(8), pppd(8), pppoe.conf(5), pppoe(8), adsl-setup(8), adsl-status(8), pppoe-sniff(8), pppoe- server(8) 4th Berkeley Distribution 26 January 2001 PPPOE-RELAY(8)
All times are GMT -4. The time now is 12:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy