Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-16-2018, 05:30 AM   #1
LQ Newbie
Registered: Oct 2018
Posts: 2

Rep: Reputation: Disabled
Iptables on gateway

I hav several clients to this gw.
I want to use IPTABLES for firewall. I downloaded n installed.
iptables comand is working on prompt.

linux> service iptables status
service: no such service iptables

what could be problem???


Also if i flush iptables tables to write my own, thn this comp is getting disconnected from LAN

linux> ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=63 time=0.517 ms
64 bytes from icmp_seq=2 ttl=63 time=0.501 ms
64 bytes from icmp_seq=3 ttl=63 time=0.504 ms

--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.501/0.507/0.517/0.019 ms

linux> iptables -F
linux> ping
no response
Old 10-16-2018, 10:18 AM   #2
Registered: Jul 2018
Distribution: Slackware,x86_64,current
Posts: 262

Rep: Reputation: 94
1) What is your distribution ?
Because you may have to install a package and you should probably use systemd command.

2) What are your iptables rules and your network config ?
Old 10-16-2018, 05:18 PM   #3
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 251

Rep: Reputation: Disabled
Not knowing your distribution is a problem. My guess, speaking generically, is that you have iptables installed but not an iptables-services package which would give you the services file required to run it under systemd. Flushing your rules should leave your policies intact. What are they? I'll bet they are DROP across the board. That would certainly do it. Try running iptables -L -v -n --line-numbers > rules as root (or sudo or the equivalent) and then look at the file named rules. That should tell you a lot including your policies.

You probably should either install iptables-services or write your own services file. It isn't that hard to write a simple one. Look at a few .service files on your computer until you find a fairly simple one you can copy and modify. Most of the commands are pretty obvious but looking at the man page for systemd should get you started. Remember that when you add, delete or change a service file you need to reload (sudo systemctl daemon-reload). Then when it is right, sudo systemctl enable <service file name> to allow it to run automatically.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Gateway/iptables help! basil_brush Slackware 1 10-14-2012 06:09 PM
IPtables and a Frox gateway Scormen Linux - Server 0 03-27-2009 03:38 PM
Iptables on gateway rcm_b05 Linux - Networking 2 11-16-2007 11:18 PM
Linux gateway with iptables - Everybody help me, please b:z Linux - Security 1 03-30-2005 06:58 PM
iptables rules on gateway alon005 Linux - Security 7 10-05-2004 07:37 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:52 PM.

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