Btables to setup Forwarding and ethernet level NAT!


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Btables to setup Forwarding and ethernet level NAT!
# 1  
Old 03-31-2015
Btables to setup Forwarding and ethernet level NAT!

Link to this post 13 minutes ago
I would like to use ebtables to perform the following 2 things:

SCENARIO I: I would like to forward all the packets received from eth0 interface onto the eth1 interface. Similarly would like to forward all the reverse packets received from eth1 interface onto the eth0 interface without changing anything.

SCENARIO II:

I would like to setup a NAT where eth0 is the external interface and eth1 is the internal interface where all the packets received on eth1 is forwarded to the external eth0 interface with the eth0 mac address replacing the internal network mac address and vice versa.

At IP level i can do the same like shown below:

Code:
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT

/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT

I would like to achieve this same scenario at ethernet level?

Kindly help me out for both the above scenarios.

Last edited by Don Cragun; 03-31-2015 at 07:56 AM.. Reason: Add CODE tags.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

SSL certificate generation on OS level or application level

We have a RHEL 5.8 server at the production level and we have a Java application on this server. I know of the SSL certificate generation at the OS (RHEL) level but it is implemented on the Java application by our development team using the Java keytool. My doubt is that is the SSL generation can... (3 Replies)
Discussion started by: RHCE
3 Replies

2. AIX

vio server ethernet to vio client ethernet(concepts confusing)

Hi In the vio server when I do # lsattr -El hdisk*, I get a PVID. The same PVID is also seen when I put the lspv command on the vio client partition. This way Im able to confirm the lun using the PVID. Similarly how does the vio client partition gets the virtual ethernet scsi client adapter... (1 Reply)
Discussion started by: newtoaixos
1 Replies

3. IP Networking

NAT Forwarding Issue Endian and Vyatta Firewall

I've experienced this same issue with both the Endian Firewall Appliance and a Vyatta Firewall Appliance. Conversely, it works with a Draytek Firewall/Router. I am trying to forward port 80 traffic to my internal web server which is located on the /24 subnet. I have an external static IP which... (0 Replies)
Discussion started by: mboudro
0 Replies

4. Solaris

Difference between run level & init level

what are the major Difference Between run level & init level (2 Replies)
Discussion started by: rajaramrnb
2 Replies

5. IP Networking

L2 nat

Hi All, Is there any possibility to change the IP address of a package according to its MAC address. It would be a sort of L2 NAT. (i.e. If the MAC address is 00:1A:A0:1E:XX:XX so the dir IP will be 192.168.X.X) Thanks!. (4 Replies)
Discussion started by: lagigliaivan
4 Replies

6. Cybersecurity

ssh X-forwarding and remote forwarding behind proxy

Hi, from my workplace we use a proxy to connect to the outside world, including external ssh servers. The problem is that the server is seeing the connection coming from the proxy and knows nothing about the client behind it. The ssh connection itself works fine, but x-forwarding does not work as... (1 Reply)
Discussion started by: vampirodolce
1 Replies

7. AIX

NIM server setup on etherchannel setup environment

I know that IBM's official stance is that NIM does not work on etherchannel environment, but has anyone able to get around it? I'm working on a p5-590 LPAR system, and the NIM master and clients are all on the same frame. Any help is appreciated. (1 Reply)
Discussion started by: pdtak
1 Replies

8. IP Networking

NAT address

Hi Could anybody tell me the solaris command to display the NAT address Thanks in advance (5 Replies)
Discussion started by: axes
5 Replies

9. BSD

proxy or NAT

how do i configure proxy in freeBSD or NAT so that when i set it up as a server can connect other to my new gateway (0 Replies)
Discussion started by: AkinOkin
0 Replies
Login or Register to Ask a Question