Skip to content

Commit

Permalink
iptables规则增加到首行
Browse files Browse the repository at this point in the history
  • Loading branch information
wntr committed Dec 19, 2015
1 parent 802b8bb commit c18799b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net/fs/server/FSServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void startFirewall_linux() {

void setFireWall_linux_udp() {
cleanUdpTunRule();
String cmd2 = "iptables -A INPUT -p udp --dport " + routePort + " -j ACCEPT"
String cmd2 = "iptables -I INPUT -p udp --dport " + routePort + " -j ACCEPT"
+ " -m comment --comment udptun_fs_server";
runCommand(cmd2);
}
Expand All @@ -96,7 +96,7 @@ void cleanUdpTunRule() {

void setFireWall_linux_tcp() {
cleanTcpTunRule();
String cmd2 = "iptables -A INPUT -p tcp --dport " + routePort + " -j DROP"
String cmd2 = "iptables -I INPUT -p tcp --dport " + routePort + " -j DROP"
+ " -m comment --comment tcptun_fs_server ";
runCommand(cmd2);

Expand Down

0 comments on commit c18799b

Please sign in to comment.