LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-01-2019, 07:49 PM   #1
doughyi8u
Member
 
Registered: Apr 2010
Posts: 254

Rep: Reputation: 10
trouble with nat in debian 10


I have a Debian firewall running nat. I can connect to the internet from the firewall and can hit the outside network from a windows pc connected to the second (internal) interface of the firewall. The problem is, when I try to use a Linux computer (I have a pc and a laptop both running Debian)I can only ping the address of the inside card of the firewall but not anything past it. Traceroute will fail before it even gets to the firewall.
 
Old 12-02-2019, 02:47 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,043

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
there are 2 cases:
1. need to configure network on the linux box
2. need to configure the router.
But without details hard to say anything.
 
Old 12-02-2019, 08:17 AM   #3
doughyi8u
Member
 
Registered: Apr 2010
Posts: 254

Original Poster
Rep: Reputation: 10
That's what's confusing me. Everything is right when I have a windows computer running to the Linux firewall but when I use one of two Linux computers it fails. So I know the firewall is configured right. I have changed nothing between the tests of windows or Linux.

Last edited by doughyi8u; 12-02-2019 at 08:18 AM.
 
Old 12-02-2019, 08:28 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
How are the debian systems configured? DHCP or static IP address.

Can you ping outside your LAN using an IP address versus URL? Try ping google i.e
ping 172.217.12.78
 
Old 12-02-2019, 08:34 AM   #5
doughyi8u
Member
 
Registered: Apr 2010
Posts: 254

Original Poster
Rep: Reputation: 10
Static, the same as the windows computers. And yes, I'm able to ping the inside interface on the Linux router. I looked at the routing tables in the Linux computers and still same results. I checked that it's not DNS too by pinging ip addresses on the internet instead of hostnames.

Last edited by doughyi8u; 12-02-2019 at 08:35 AM.
 
Old 12-02-2019, 08:54 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Did you configure the static IP address using network manager or the interfaces file?
 
Old 12-02-2019, 08:56 AM   #7
doughyi8u
Member
 
Registered: Apr 2010
Posts: 254

Original Poster
Rep: Reputation: 10
interfaces file
 
Old 12-02-2019, 09:09 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
If network manager is still running it could override the interfaces file.
 
Old 12-02-2019, 09:13 AM   #9
doughyi8u
Member
 
Registered: Apr 2010
Posts: 254

Original Poster
Rep: Reputation: 10
I checked that network manager wasn't running and still get the same results
 
Old 12-02-2019, 09:36 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Please post your interfaces file.
 
Old 12-02-2019, 09:47 AM   #11
doughyi8u
Member
 
Registered: Apr 2010
Posts: 254

Original Poster
Rep: Reputation: 10
Code:
auto lo
iface lo inet loopback

allow-hotplug eno1
iface eno1 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    gateway 192.168.0.1

allow-hotplug ens2
iface ens2 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    gateway 192.168.0.1
 
Old 12-02-2019, 09:53 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
I assume that is the firewall? What about your debian PC and laptop?

You only need the gateway defined on the WAN interface.

In my other posts I did not specify which computer I was referencing.
 
Old 12-02-2019, 10:03 AM   #13
doughyi8u
Member
 
Registered: Apr 2010
Posts: 254

Original Poster
Rep: Reputation: 10
the interface file from the last post was from the PC that is connected to the inside of the firewall. It's frustrating because it will work fine with windows and then when I simply remove the ethernet cable from the windows computer and plug it into any of the debian computers on the inside it will ping the interface of the firewall fine but nothing past it. So I know the firewall is right, or at least assume it is since it works fine with the windows pc.
 
Old 12-02-2019, 10:53 AM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
I would disable the unused network adapter and see what happens.
Post the output of the command
ip route show
 
Old 12-02-2019, 11:34 PM   #15
TedHornsby84
Member
 
Registered: Mar 2010
Location: Dallas, TX
Posts: 40

Rep: Reputation: 2
Maybe you don't have nft rules setup to handle incoming packets from your Debian desktop?

Is netfilter configured to recognize all traffic coming from within your internal LAN subnet the same or solely based on specific IP addresses?

Last edited by TedHornsby84; 12-02-2019 at 11:36 PM. Reason: Clarity
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NAT and NAT Server behind its own NAT(private network) zeusys Linux - Networking 1 06-08-2011 06:22 PM
Difference between NAT and NO NAT plisken Linux - Networking 1 01-10-2008 11:53 AM
I configure NAT and use "services ..." to save it but when I reboot there is no nat bruack Linux - Software 4 09-01-2004 02:38 AM
Susefirewall2 Nat Problem / nat 1:1 trubi Linux - Distributions 0 07-20-2004 05:50 AM
What's the difference between Linux-NAT and Sygate-NAT? yuzuohong Linux - Networking 0 08-07-2002 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration