starting and stopping Iptables

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
richard-g8jvm
Level 3
Level 3
Posts: 118
Joined: Fri Jul 26, 2013 12:46 pm

starting and stopping Iptables

Post by richard-g8jvm » Fri Sep 14, 2018 7:47 am

Hi
does iptables show as a process if you run ps ax
Is iptables a service ?
it does not respond to service or systemctl
I've got a problem with what was working redirecting packets from one port to another on another machine.
the ports are open

Code: Select all

nmap -v 192.168.1.80

Starting Nmap 7.60 ( https://nmap.org ) at 2018-09-14 12:32 BST
Initiating Ping Scan at 12:32
Scanning 192.168.1.80 [2 ports]
Completed Ping Scan at 12:32, 0.00s elapsed (1 total hosts)
Initiating Connect Scan at 12:32
Scanning odroidc1 (192.168.1.80) [1000 ports]
Discovered open port 22/tcp on 192.168.1.80
Completed Connect Scan at 12:32, 1.21s elapsed (1000 total ports)
Nmap scan report for odroidc1 (192.168.1.80)
Host is up (0.0059s latency).
Not shown: 996 closed ports
PORT     STATE    SERVICE
22/tcp   open     ssh
8081/tcp filtered blackice-icecap
8083/tcp filtered us-srv
8085/tcp filtered unknown

Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 1.28 seconds

Code: Select all

iptables -t nat -vL
Chain PREROUTING (policy ACCEPT 7 packets, 2020 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DNAT       tcp  --  any    any     anywhere             anywhere             tcp dpt:8083 to:192.168.1.70:8083
    1    40 DNAT       tcp  --  any    any     anywhere             anywhere             tcp dpt:tproxy to:192.168.1.71:7776
    0     0 DNAT       tcp  --  any    any     anywhere             anywhere             tcp dpt:8085 to:192.168.1.72:7777

Chain INPUT (policy ACCEPT 7 packets, 2020 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 2 packets, 147 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain POSTROUTING (policy ACCEPT 2 packets, 147 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 MASQUERADE  tcp  --  any    any     anywhere             odroid.lan           tcp dpt:8083

however, if I do a iptables-save to a file it shows the history of table modifications as well as the current rules.

I see on howtos etc that iptables can be started with "service iptables start" or systemctl start iptables
but I get no service replies.
Its very confusing
It was all working fine until I attempted to make a openvpn tunnel between machines, then it stopped.
openvpn is not enabled or running at the moment, until I can find out why, but I'm really stuck
thanks

Post Reply

Return to “Newbie Questions”