Centos – How to disable TCP/IP for an Ethernet adapter

centosethernetipppp

I have CentOS 6.3 running in a (virtual) machine with two Ethernet adapters. I have eth0 connected to a TCP/IP LAN and eth1 connected to a DSL modem. The system is intended as a dedicated router/firewall, and has iptables set up to do SNAT, DNAT, and the desired filtering.

This was working great but I changed DSL modems and unfortunately the new (faster) one is idiotproofed and so automatically does NAT and will not allow me to pass my public IP along to eth1. I can't tolerate double NAT so I did some research and read that this modem can be 'tricked' into giving my computer a public IP by doing the PPPoE on the computer.

I therefore set up pppd to use eth1, creating the ppp0 connection which I then substitute for eth1 in my custom iptables config script. This seems to work to a degree but I had to open up the firewall to get it to work, and it's flaky.

Partly to help in troubleshooting, I want to totally rule out the possibility of any TCP/IP traffic being directly routed to eth1 where my 'friendly' modem will happily NAT it.

To the best of my knowledge, PPPoE sits below, not above IP – on the physical interface it deals directly in Ethernet frames. Therefore I should not even have to have IP networking configured on eth1 at all in order for pppd to work, and IP networking running on eth1 therefore is just complicating matters needlessly.

Here's where I discover, silly me, I don't know how to disable the TCP/IP stack on Linux! I know on a Windows box you can just uncheck the TCP/IP protocol in the adapter properties, but here I am running a text-only CentOS and I have no idea how to do it.

Apparently it's not a very common desire, because I've been searching the Internet to no avail. It seems like a hard-wired assumption that an Ethernet adapter is a TCP/IP connection. Well, usually…

Thanks for any help!
Kevin

Best Answer

Just remove the IPv4 and IPv6 addresses with ip addr flush dev eth1 and ip -6 addr flush dev eth1.

Related Question